From 783f818f1965cfa1300fb49b0ff058a19986d34d Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Tue, 2 Feb 2016 11:54:54 -0500 Subject: [PATCH 1/6] Eeschema: fix segfault when drawing new sheet after deleting existing sheet with the same file. (fixes lp:1538510) --- eeschema/sheet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index 95005c671e..93bdecfa4e 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -357,7 +357,7 @@ SCH_SHEET* SCH_EDIT_FRAME::CreateSheet( wxDC* aDC ) sheet->SetFlags( IS_NEW | IS_RESIZED ); sheet->SetTimeStamp( GetNewTimeStamp() ); - sheet->SetParent( GetScreen() ); + sheet->SetParent( GetCurrentSheet().Last() ); sheet->SetScreen( NULL ); // need to check if this is being added to the GetDrawItems(). From 50db57f4d53fcc900b49f670e719ff19c4e353ff Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 2 Feb 2016 21:32:11 +0100 Subject: [PATCH 2/6] Pcbnew: fix Bug #1540967 (zone keepout incorrectly created if previously a corner-smoothed copper zone was created). This option (non relevant for a zone keepout) is now cleared. --- pcbnew/pcb_parser.cpp | 10 +++++++--- pcbnew/zones_by_polygon.cpp | 5 ++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index a2a4377f6d..e6177e6162 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2694,11 +2694,13 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) break; case T_chamfer: - zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_CHAMFER ); + if( !zone->GetIsKeepout() ) // smoothing has meaning only for filled zones + zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_CHAMFER ); break; case T_fillet: - zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_FILLET ); + if( !zone->GetIsKeepout() ) // smoothing has meaning only for filled zones + zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_FILLET ); break; default: @@ -2708,7 +2710,9 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) break; case T_radius: - zone->SetCornerRadius( parseBoardUnits( "corner radius" ) ); + tmp = parseBoardUnits( "corner radius" ); + if( !zone->GetIsKeepout() ) // smoothing has meaning only for filled zones + zone->SetCornerRadius( tmp ); NeedRIGHT(); break; diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 4d5663b0de..cdbc1df08b 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -589,9 +589,12 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) if( GetToolId() == ID_PCB_KEEPOUT_AREA_BUTT ) { zoneInfo.SetIsKeepout( true ); - // Netcode and netname are irrelevant, + // Netcode, netname and some other settings are irrelevant, // so ensure they are cleared zone->SetNetCode( NETINFO_LIST::UNCONNECTED ); + zoneInfo.SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_NONE ); + zoneInfo.SetCornerRadius( 0 ); + edited = InvokeKeepoutAreaEditor( this, &zoneInfo ); } else From 0ef1eee2c6368a211579c159e78fe740f377d0f1 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Tue, 2 Feb 2016 19:45:43 -0500 Subject: [PATCH 3/6] Eeschema: move recursion check from SCH_SHEET_PATH to SCH_SHEET. * Add const and non-const version of GetRootSheet() to SCH_SHEET. * Add GetSheetPaths() function to SCH_SHEET which behaves the same way as SCH_SHEET_LIST except it uses standard C++ containers and is a much simpler design. --- eeschema/block.cpp | 7 ++- eeschema/sch_sheet.cpp | 109 +++++++++++++++++++++++++++++++++++- eeschema/sch_sheet.h | 35 +++++++++++- eeschema/sch_sheet_path.cpp | 94 ------------------------------- eeschema/sch_sheet_path.h | 26 --------- eeschema/schedit.cpp | 2 +- eeschema/schframe.cpp | 2 +- eeschema/schframe.h | 2 +- eeschema/sheet.cpp | 9 +-- 9 files changed, 152 insertions(+), 134 deletions(-) diff --git a/eeschema/block.cpp b/eeschema/block.cpp index 9edd9d43fa..bcc8828e46 100644 --- a/eeschema/block.cpp +++ b/eeschema/block.cpp @@ -475,10 +475,11 @@ void SCH_EDIT_FRAME::PasteListOfItems( wxDC* DC ) if( srcFn.IsRelative() ) srcFn.MakeAbsolute( Prj().GetProjectPath() ); - SCH_SHEET_LIST sheetHierarchy( sheet ); + std::vector< std::vector< const SCH_SHEET* > > sheetHierarchy; + sheet->GetSheetPaths( sheetHierarchy ); - if( hierarchy.TestForRecursion( sheetHierarchy, - destFn.GetFullPath( wxPATH_UNIX ) ) ) + if( g_RootSheet->TestForRecursion( sheetHierarchy, + destFn.GetFullPath( wxPATH_UNIX ) ) ) { wxString msg; diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index 85549a19a6..451ee64e2e 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -1187,10 +1187,31 @@ unsigned SCH_SHEET::GetSheets( std::vector& aSheetList ) const } -SCH_SHEET* SCH_SHEET::GetRootSheet() +void SCH_SHEET::GetSheetPaths( std::vector< std::vector< const SCH_SHEET* > >& aSheetPaths ) const +{ + static std::vector< const SCH_SHEET* > path; + + path.push_back( const_cast< SCH_SHEET* >( this ) ); + aSheetPaths.push_back( path ); + + SCH_ITEM* item = m_screen->GetDrawItems(); + + while( item ) + { + if( item->Type() == SCH_SHEET_T ) + ( (SCH_SHEET*) item )->GetSheetPaths( aSheetPaths ); + + item = item->Next(); + } + + path.pop_back(); +} + + +const SCH_SHEET* SCH_SHEET::GetRootSheet() const { EDA_ITEM* parent = GetParent(); - SCH_SHEET* rootSheet = this; + const SCH_SHEET* rootSheet = const_cast< SCH_SHEET* >( this ); while( parent ) { @@ -1200,7 +1221,7 @@ SCH_SHEET* SCH_SHEET::GetRootSheet() parent = parent->GetParent(); } - return rootSheet; + return const_cast< SCH_SHEET* >( rootSheet ); } @@ -1582,6 +1603,88 @@ int SCH_SHEET::operator-( const SCH_SHEET& aRhs ) const } +bool SCH_SHEET::TestForRecursion( std::vector< std::vector< const SCH_SHEET* > >& aSrcSheetHierarchy, + const wxString& aDestFileName ) const +{ + std::vector< std::vector< const SCH_SHEET* > > hierarchy; + wxFileName rootFn = GetRootSheet()->GetFileName(); + wxFileName destFn = aDestFileName; + + if( destFn.IsRelative() ) + destFn.MakeAbsolute( rootFn.GetPath() ); + + GetRootSheet()->GetSheetPaths( hierarchy ); + + // Test each SCH_SHEET_PATH in this SCH_SHEET_LIST for potential recursion. + for( unsigned i = 0; i < hierarchy.size(); i++ ) + { + // Test each SCH_SHEET_PATH in the source sheet. + for( unsigned j = 0; j < aSrcSheetHierarchy.size(); j++ ) + { + std::vector< const SCH_SHEET* > sheetPath = aSrcSheetHierarchy[ j ]; + + for( unsigned k = 0; k < sheetPath.size(); k++ ) + { + wxFileName srcFn = sheetPath[k]->GetFileName(); + + if( srcFn.IsRelative() ) + srcFn.MakeAbsolute( rootFn.GetPath() ); + + // The source and destination sheet file names cannot be the same. + if( srcFn == destFn ) + return true; + + /// @todo Store sheet file names with full path, either relative to project path + /// or absolute path. The current design always assumes subsheet files are + /// located in the project folder which may or may not be desirable. + std::vector< const SCH_SHEET* > destPath = hierarchy[i]; + unsigned l = 0; + + while( l < destPath.size() ) + { + wxFileName cmpFn = destPath[i]->GetFileName(); + + if( cmpFn.IsRelative() ) + cmpFn.MakeAbsolute( rootFn.GetPath() ); + + // Test if the file name of the destination sheet is in anywhere in the + // source sheet path. + if( cmpFn == destFn ) + break; + + l++; + } + + // The destination sheet file name was not found in the any of the source sheet + // path or the destination sheet file name is the root sheet so no recursion is + // possible. + if( l >= destPath.size() || l == 0 ) + return false; + + // Walk back up to the root sheet to see if the source file name is already a + // parent in destination the sheet path. If so, recursion will occur. + do + { + l -= 1; + + wxFileName cmpFn = destPath[i]->GetFileName(); + + if( cmpFn.IsRelative() ) + cmpFn.MakeAbsolute( rootFn.GetPath() ); + + if( cmpFn == srcFn ) + return true; + + } while( l != 0 ); + } + } + } + + // The source sheet file can safely be added to the destination sheet file. + return false; +} + + #if defined(DEBUG) void SCH_SHEET::Show( int nestLevel, std::ostream& os ) const diff --git a/eeschema/sch_sheet.h b/eeschema/sch_sheet.h index ccb4c7e674..3989112115 100644 --- a/eeschema/sch_sheet.h +++ b/eeschema/sch_sheet.h @@ -250,6 +250,8 @@ class SCH_SHEET : public SCH_ITEM // than assigned in the order the sheets were parsed and loaded. int m_number; + SCH_SHEET* getRootSheet(); + public: SCH_SHEET( const wxPoint& pos = wxPoint( 0, 0 ) ); @@ -599,6 +601,18 @@ public: */ unsigned GetSheets( std::vector& aSheetList ) const; + /** + * Function GetSheetPaths + * + * Returns a list of lists of #SCH_SHEET pointers to \a sSheetPaths. + * + * This is analagous to the old SCH_SHEET_LIST::BuildSheetList(). It creates a list of + * stacks to the sheet pointer hierarchy. + * + * @param aSheetPaths is a vector of vector of #SCH_SHEET pointers. + */ + void GetSheetPaths( std::vector< std::vector< const SCH_SHEET* > >& aSheetPaths ) const; + /** * Function GetRootSheet * @@ -610,7 +624,12 @@ public: * * @return a SCH_SHEET pointer to the root sheet. */ - SCH_SHEET* GetRootSheet(); + const SCH_SHEET* GetRootSheet() const; + + SCH_SHEET* GetRootSheet() + { + return const_cast< SCH_SHEET* >( static_cast< const SCH_SHEET&>( *this ).GetRootSheet() ); + } /** * Function IsRootSheet @@ -747,6 +766,20 @@ public: */ SCH_ITEM* FindNextItem( KICAD_T aType, SCH_ITEM* aLastItem = NULL, bool aWrap = false ) const; + /** + * Function TestForRecursion + * + * test every SCH_SHEET in the SCH_SHEET hierarchy to verify if adding the sheets stored + * in \a aSrcSheetHierarchy to the sheet stored in \a aDestFileName will cause recursion. + * + * @param aSrcSheetHierarchy is a list #SCH_SHEET pointer lists of the source sheet add + * to \a aDestFileName. + * @param aDestFileName is the file name of the destination sheet for \a aSrcFileName. + * @return true if \a aFileName will cause recursion in the sheet path. Otherwise false. + */ + bool TestForRecursion( std::vector< std::vector< const SCH_SHEET* > >& aSrcSheetHierarchy, + const wxString& aDestFileName ) const; + #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const; // override #endif diff --git a/eeschema/sch_sheet_path.cpp b/eeschema/sch_sheet_path.cpp index f20056d26e..f457d1e1f0 100644 --- a/eeschema/sch_sheet_path.cpp +++ b/eeschema/sch_sheet_path.cpp @@ -294,69 +294,6 @@ bool SCH_SHEET_PATH::operator==( const SCH_SHEET_PATH& d1 ) const } -bool SCH_SHEET_PATH::TestForRecursion( const wxString& aSrcFileName, - const wxString& aDestFileName ) const -{ - wxFileName rootFn = g_RootSheet->GetFileName(); - wxFileName srcFn = aSrcFileName; - wxFileName destFn = aDestFileName; - - if( srcFn.IsRelative() ) - srcFn.MakeAbsolute( rootFn.GetPath() ); - - if( destFn.IsRelative() ) - destFn.MakeAbsolute( rootFn.GetPath() ); - - - // The source and destination sheet file names cannot be the same. - if( srcFn == destFn ) - return true; - - /// @todo Store sheet file names with full path, either relative to project path - /// or absolute path. The current design always assumes subsheet files are - /// located in the project folder which may or may not be desirable. - unsigned i = 0; - - while( i < m_numSheets ) - { - wxFileName cmpFn = m_sheets[i]->GetFileName(); - - if( cmpFn.IsRelative() ) - cmpFn.MakeAbsolute( rootFn.GetPath() ); - - // Test if the file name of the destination sheet is in anywhere in this sheet path. - if( cmpFn == destFn ) - break; - - i++; - } - - // The destination sheet file name was not found in the sheet path or the destination - // sheet file name is the root sheet so no recursion is possible. - if( i >= m_numSheets || i == 0 ) - return false; - - // Walk back up to the root sheet to see if the source file name is already a parent in - // the sheet path. If so, recursion will occur. - do - { - i -= 1; - - wxFileName cmpFn = m_sheets[i]->GetFileName(); - - if( cmpFn.IsRelative() ) - cmpFn.MakeAbsolute( rootFn.GetPath() ); - - if( cmpFn == srcFn ) - return true; - - } while( i != 0 ); - - // The source sheet file name is not a parent of the destination sheet file name. - return false; -} - - int SCH_SHEET_PATH::FindSheet( const wxString& aFileName ) const { for( unsigned i = 0; i < m_numSheets; i++ ) @@ -600,37 +537,6 @@ SCH_ITEM* SCH_SHEET_LIST::FindPreviousItem( KICAD_T aType, SCH_SHEET_PATH** aShe } -bool SCH_SHEET_LIST::TestForRecursion( const SCH_SHEET_LIST& aSrcSheetHierarchy, - const wxString& aDestFileName ) const -{ - wxFileName rootFn = g_RootSheet->GetFileName(); - wxFileName destFn = aDestFileName; - - if( destFn.IsRelative() ) - destFn.MakeAbsolute( rootFn.GetPath() ); - - // Test each SCH_SHEET_PATH in this SCH_SHEET_LIST for potential recursion. - for( int i = 0; i < m_count; i++ ) - { - // Test each SCH_SHEET_PATH in the source sheet. - for( int j = 0; j < aSrcSheetHierarchy.GetCount(); j++ ) - { - SCH_SHEET_PATH* sheetPath = aSrcSheetHierarchy.GetSheet( j ); - - for( unsigned k = 0; k < sheetPath->GetCount(); k++ ) - { - if( m_list[i].TestForRecursion( sheetPath->GetSheet( k )->GetFileName(), - aDestFileName ) ) - return true; - } - } - } - - // The source sheet file can safely be added to the destination sheet file. - return false; -} - - SCH_SHEET* SCH_SHEET_LIST::FindSheetByName( const wxString& aSheetName ) { for( int i = 0; i < m_count; i++ ) diff --git a/eeschema/sch_sheet_path.h b/eeschema/sch_sheet_path.h index be3e11a87a..266684ca53 100644 --- a/eeschema/sch_sheet_path.h +++ b/eeschema/sch_sheet_path.h @@ -220,19 +220,6 @@ public: */ SCH_ITEM* FindPreviousItem( KICAD_T aType, SCH_ITEM* aLastItem = NULL, bool aWrap = false ) const; - /** - * Function TestForRecursion - * - * test the SCH_SHEET_PATH file names to check adding the sheet stored in the file - * \a aSrcFileName to the sheet stored in file \a aDestFileName will cause a sheet - * path recursion. - * - * @param aSrcFileName is the source file name of the sheet add to \a aDestFileName. - * @param aDestFileName is the file name of the destination sheet for \a aSrcFileName. - * @return true if \a aFileName will cause recursion in the sheet path. Otherwise false. - */ - bool TestForRecursion( const wxString& aSrcFileName, const wxString& aDestFileName ) const; - int FindSheet( const wxString& aFileName ) const; /** @@ -388,19 +375,6 @@ public: SCH_ITEM* FindPreviousItem( KICAD_T aType, SCH_SHEET_PATH** aSheetFound = NULL, SCH_ITEM* aLastItem = NULL, bool aWrap = true ); - /** - * Function TestForRecursion - * - * test every SCH_SHEET_PATH in the SCH_SHEET_LIST to verify if adding the sheets stored - * in \a aSrcSheetHierarchy to the sheet stored in \a aDestFileName will cause recursion. - * - * @param aSrcSheetHierarchy is the SCH_SHEET_LIST of the source sheet add to \a aDestFileName. - * @param aDestFileName is the file name of the destination sheet for \a aSrcFileName. - * @return true if \a aFileName will cause recursion in the sheet path. Otherwise false. - */ - bool TestForRecursion( const SCH_SHEET_LIST& aSrcSheetHierarchy, - const wxString& aDestFileName ) const; - /** * Function FindSheetByName * diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 864f8d5f61..4d46360b1a 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -983,7 +983,7 @@ void SCH_EDIT_FRAME::OnEditItem( wxCommandEvent& aEvent ) } case SCH_SHEET_T: - if( EditSheet( (SCH_SHEET*) item, m_CurrentSheet ) ) + if( EditSheet( (SCH_SHEET*) item, m_CurrentSheet->Last() ) ) m_canvas->Refresh(); break; diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 535435f222..3911f0c468 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -1274,7 +1274,7 @@ void SCH_EDIT_FRAME::addCurrentItemToList( bool aRedraw ) // the m_mouseCaptureCallback function. m_canvas->SetMouseCapture( NULL, NULL ); - if( !EditSheet( (SCH_SHEET*)item, m_CurrentSheet ) ) + if( !EditSheet( (SCH_SHEET*)item, m_CurrentSheet->Last() ) ) { screen->SetCurItem( NULL ); delete item; diff --git a/eeschema/schframe.h b/eeschema/schframe.h index 23a9bb0581..fe9fd529cc 100644 --- a/eeschema/schframe.h +++ b/eeschema/schframe.h @@ -1015,7 +1015,7 @@ public: * * Note: the screen is not refresh. The caller is responsible to do that */ - bool EditSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy ); + bool EditSheet( SCH_SHEET* aSheet, SCH_SHEET* aHierarchy ); wxPoint GetLastSheetPinPosition() const { return m_lastSheetPinPosition; } diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index 93bdecfa4e..0fb98e958a 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -41,7 +41,7 @@ #include -bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy ) +bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, SCH_SHEET* aHierarchy ) { if( aSheet == NULL || aHierarchy == NULL ) return false; @@ -235,15 +235,16 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy ) (long unsigned) aSheet->GetTimeStamp() ) ); // Make sure the sheet changes do not cause any recursion. - SCH_SHEET_LIST sheetHierarchy( aSheet ); + std::vector< std::vector< const SCH_SHEET* > > sheetHierarchy; + aSheet->GetSheetPaths( sheetHierarchy ); // Make sure files have fully qualified path and file name. - wxFileName destFn = aHierarchy->Last()->GetFileName(); + wxFileName destFn = aHierarchy->GetFileName(); if( destFn.IsRelative() ) destFn.MakeAbsolute( Prj().GetProjectPath() ); - if( hierarchy.TestForRecursion( sheetHierarchy, destFn.GetFullPath( wxPATH_UNIX ) ) ) + if( g_RootSheet->TestForRecursion( sheetHierarchy, destFn.GetFullPath( wxPATH_UNIX ) ) ) { msg.Printf( _( "The sheet changes cannot be made because the destination sheet already " "has the sheet <%s> or one of it's subsheets as a parent somewhere in " From c16b66ce0c1a5dd7b94623e799bcb3b8f09b6435 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 3 Feb 2016 11:01:00 +0100 Subject: [PATCH 4/6] Ratsnest does not take into account non-copper pads (GAL). --- pcbnew/ratsnest_data.cpp | 78 +++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 36 deletions(-) diff --git a/pcbnew/ratsnest_data.cpp b/pcbnew/ratsnest_data.cpp index 043a61a129..71b297a3cf 100644 --- a/pcbnew/ratsnest_data.cpp +++ b/pcbnew/ratsnest_data.cpp @@ -427,6 +427,10 @@ void RN_NET::Update() void RN_NET::AddItem( const D_PAD* aPad ) { + // Ratsnest is not computed for non-copper pads + if( ( aPad->GetLayerSet() & LSET::AllCuMask() ).none() ) + return; + RN_NODE_PTR node = m_links.AddNode( aPad->GetPosition().x, aPad->GetPosition().y ); node->AddParent( aPad ); m_pads[aPad].m_Node = node; @@ -672,51 +676,53 @@ std::list RN_NET::GetNodes( const BOARD_CONNECTED_ITEM* aItem ) con { std::list nodes; - try + switch( aItem->Type() ) { - switch( aItem->Type() ) + case PCB_PAD_T: + { + PAD_NODE_MAP::const_iterator it = m_pads.find( static_cast( aItem ) ); + + if( it != m_pads.end() ) + nodes.push_back( it->second.m_Node ); + } + break; + + case PCB_VIA_T: + { + VIA_NODE_MAP::const_iterator it = m_vias.find( static_cast( aItem ) ); + + if( it != m_vias.end() ) + nodes.push_back( it->second ); + } + break; + + case PCB_TRACE_T: + { + TRACK_EDGE_MAP::const_iterator it = m_tracks.find( static_cast( aItem ) ); + + if( it != m_tracks.end() ) { - case PCB_PAD_T: - { - const D_PAD* pad = static_cast( aItem ); - nodes.push_back( m_pads.at( pad ).m_Node ); + nodes.push_back( it->second->GetSourceNode() ); + nodes.push_back( it->second->GetTargetNode() ); } - break; + } + break; - case PCB_VIA_T: + case PCB_ZONE_AREA_T: + { + ZONE_DATA_MAP::const_iterator it = m_zones.find( static_cast( aItem ) ); + + if( it != m_zones.end() ) { - const VIA* via = static_cast( aItem ); - nodes.push_back( m_vias.at( via ) ); - } - break; - - case PCB_TRACE_T: - { - const TRACK* track = static_cast( aItem ); - const RN_EDGE_MST_PTR& edge = m_tracks.at( track ); - - nodes.push_back( edge->GetSourceNode() ); - nodes.push_back( edge->GetTargetNode() ); - } - break; - - case PCB_ZONE_AREA_T: - { - const ZONE_CONTAINER* zone = static_cast( aItem ); - const std::deque& polys = m_zones.at( zone ).m_Polygons; - + const std::deque& polys = it->second.m_Polygons; for( std::deque::const_iterator it = polys.begin(); it != polys.end(); ++it ) nodes.push_back( it->GetNode() ); } - break; - - default: - break; - } } - catch( ... ) - { - // It is fine, just return empty list of nodes + break; + + default: + break; } return nodes; From a9bf46a5de527f0016e982364b891985409409c4 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Wed, 3 Feb 2016 19:12:24 -0500 Subject: [PATCH 5/6] Documentation: add version 5 road map to developer documentation. --- Documentation/development/Doxyfile | 1 + Documentation/development/road-map-r5.md | 718 +++++++++++++++++++++++ Doxyfile | 1 + 3 files changed, 720 insertions(+) create mode 100644 Documentation/development/road-map-r5.md diff --git a/Documentation/development/Doxyfile b/Documentation/development/Doxyfile index 37b65222bb..96cbecc396 100644 --- a/Documentation/development/Doxyfile +++ b/Documentation/development/Doxyfile @@ -648,6 +648,7 @@ WARN_LOGFILE = INPUT = coding-style-policy.md \ stable-release-policy.md \ + road-map-r5.md \ road-map.md \ compiling.md diff --git a/Documentation/development/road-map-r5.md b/Documentation/development/road-map-r5.md new file mode 100644 index 0000000000..58f46b25b1 --- /dev/null +++ b/Documentation/development/road-map-r5.md @@ -0,0 +1,718 @@ +# Version 5 Road Map # {#v5_road_map} + +This document is the KiCad version 5 Developer's road map document. It is +living document that should be maintained during the version 5 development +cycle. The goal of this document is to provide an overview for developers +of the goals for the project for the version 5 release of KiCad. 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 +objectives 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 # {#v5_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. + + +# General # {#v5_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. + +## Create Schematic Code Shared Object. ## {#v5_kiway} +**Goal:** + +Merge common schematic code into to a separate shared object to allow access +to schematic objects by third party code and Python support. + +**Task:** + +**Dependencies:** +- None + +**Status:** +- No Progress. + +## User Interface Modernization ## {#v5_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. + +## Regular Expression Library Search ## {#v5_gen_lib_reg_ex} + +**Goal:** +Add regular expression and wildcard searching to component and footprint +library search dialogs. + +**Task:** +- Add implementation to component and footprint search dialogs. + +**Dependencies:** +- None + +**Status:** +- Initial container searching code completed. +- Searching implemented in component library search dialog. +- Needs to be added to footprint library search dialog in CvPcb and Pcbnew. + +# Build Tools # {#v5_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 ## {#v5_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:** +- In progress. + + +# Common Library # {#v5_common_lib} +This section covers the source code shared between all of the KiCad +applications + +## Unified Rendering Framework ## {#v5_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** +- In progress + +## Linux Printing Improvements ## {#v5_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 ## {#v5_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 ## {#v5_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 # {#v5_kicad} +This section applies to the source code for the KiCad application launcher. + + +# Eeschema: Schematic Editor # {#v5_eeschema} +This section applies to the source code for the Eeschema schematic editor. + +## Coherent SCHEMATIC Object ## {#v5_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:** +- In progress. + +## Hierarchical Sheet Design ## {#v5_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:** +- In progress. + +## Schematic and Component Library Plugin ## {#v5_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](#v5_plugin_base) + +**Status:** +- No progress. + +## Graphics Abstraction Layer Conversion ## {#v5_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 ## {#v5_sch_tool_framework} +**Goal:** + +Use standard tool framework across all applications. + +**Task:** +- Rewrite editing tools using the new tool framework. + +**Dependencies:** +- [GAL port](#v5_sch_gal). + +**Status:** +- Initial Discussion.. + +## S-Expression File Format ## {#v5_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](#v5_plugin_base). + +**Status:** +- File format document nearly complete. + +## Implement Sweet Component Libraries ## {#v5_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](#v5_sch_sexpr). + +**Status:** +- Initial SWEET library written. + +## Component Library Editor Usability Improvements ## {#v5_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 usability improvements. + +**Dependencies:** +- None. + +**Status:** +- No progress. + +## Component and Netlist Attributes ## {#v5_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](#v5_sch_sexpr). + +**Status:** +- No progress. + +## Net Highlighting ## {#v5_sch_net_highlight} +**Goal:** +Highlight wires, buses, and junctions when corresponding net in Pcbnew is selected. + +**Task:** +- Add communications link to handle net selection from Pcbnew. +- Implement highlight algorithm for net objects. +- Highlight objects connected to net selected in Pcbnew. + +**Dependencies:** +- [GAL port, maybe](#v5_sch_gal). + +**Status:** +- No progress. + +## Move Common Schematic Code into a Shared Object ## {#v5_sch_shared_object} +**Goal:** +Refactor all schematic object code so that it can be built into a shared object +for use by the schematic editor, Python module, and linked into third party +programs. + +**Task** +- Split schematic object code from schematic and component editor code. +- Generate shared object from schematic object code. +- Update build configuration to build schematic and component editors +against new schematic shared object. + +**Dependencies:** +- None + +**Progress:** +- No progress. + +# CvPcb: Footprint Association Tool # {#v5_cvpcb} +This section covers the source code of the footprint assignment tool CvPcb. + +## Improved Footprint Search Tool ## {#v5_cvpcb_search} + +**Goal:** +Provide advanced search features such as wild card and regular expression +searches using the type as you go feature of the current search dialog. + +**Task:** +- Add code for wild card and regular expression pattern matching to search + container objects. +- Add search dialog to CvPcb to search container of footprint names. + +**Dependencies:** +- None + +**Status:** +- Pattern matching added to search container objects. + +## Add Progress Dialog on Start Up ## {#v5_cvpcb_progress} + +**Goal:** +Provide user feedback when loading footprint libraries are loading after +start up. + +**Task:** +- Create a progress dialog to show the percentage of libraries loaded. + +**Dependencies:** +- None + +**Status:** +- No Progress + +# Pcbnew: Circuit Board Editor # {#v5_pcbnew} +This section covers the source code of the board editing application Pcbnew. + +## Tool Framework ## {#v5_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:** +- In progress. + +**Status:** +- Initial porting work in progress. + +## Linked Objects ## {#v5_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 allow a one to many object relationship which can pave +the way for reusable 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 ## {#v5_modeling} + +**Goal:** +Provide improved solid modeling support for KiCad including the file formats +available in OpenCascade. + +**Task:** +- Improve low level code design. +- 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](#v5_plugin_base). + +**Status:** +- 3D Viewer work in progress. There is also now and external tool [KiCadStepUp] + (http://sourceforge.net/projects/kicadstepup/) which allows [FreeCAD] + (http://www.freecadweb.org/) to create parametric models from KiCad board + files. + +## Push and Shove Router Improvements ## {#v5_ps_router_improvements} + +**Goal:** +Add features such as 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. + +## Pin and Part Swapping ## {#v5_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](#v5_sch_sexpr). +- [Convert to a single process application](#v5_kiway). + +**Status:** +- No progress. + +## Intelligent Selection Tool ## {#v5_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 ## {#v5_fp_edit_clipboard} +**Goal:** + +Provide clipboard cut and paste for footprint management in the footprint +editor. + +**Task:** +- Clipboard cut and paste to and from clipboard of footprints in footprint + editor. + +**Dependencies:** +- None + +**Status:** +- No progress. + +## Design Rule Check (DRC) Improvements. ## {#v5_drc_improvements} +**Goal:** + +Create additional DRC tests for improved error checking. + +**Task:** +- Replace geometry code with [unified geometry library](#v5_geometry_lib). +- Remove floating point code from clearance calculations to prevent rounding +errors. +- Add checks for component, silk screen, and mask clearances. +- Add checks for vias in zones for proper connections without having to add +traces. +- Add checks for keep out zones. +- 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.](#v5_geometry_lib) + +**Progress:** +- Planning + +## Segment End Point Snapping. ## {#v5_segment_snapping} +**Goal:** + +It is not uncommon for board edge segment end points to inadvertently not +be closed causing issues for the 3D viewer and exporting to different file +formats due the board outline not being a fully enclosed polygon. This +feature would add segment end snapping support to allow the board outline +to be fully enclosed. This feature would only need to be supported by the +GAL rendering. + +**Tasks** +- Mark board edge segment ends with a drag indicator to make it visible to the + user that the segment end does not have an endpoint with any other board edge + segment. +- Allow the user to snap the unconnected segment end to the nearest segment end + point. +- Automatically connect unconnected segments with and additional segment when + opening the 3D viewer or exporting the board to another format. Warn the + user that an addition segment has be added and should be verified. + +**Dependencies:** +- None + +**Progress:** +- Initial discussion. + +## Keepout Zones. ## {#v5_keepout_zones} +**Goal:** + +Add support for keepout zones on boards and footprints. + +**Task:** +- Add keepout support to zone classes. +- Add keepout zone support to board editor. +- Add keepout zone support to library editor. + +**Dependencies:** +- [DRC Improvements.](#v5_drc_improvements) + +**Progress:** +- Planning + +## Net Highlighting ## {#v5_pcb_net_highlight} +**Goal:** +Highlight rats nest links and/or traces when corresponding net in Eeschema is selected. + +**Task:** +- Add communications link to handle net selection from Eeschema. +- Implement highlight algorithm for objects connected to the selected net. +- Highlight objects connected to net selected in Eeschema + +**Dependencies:** +- None. + +**Status:** +- No progress. + +## Complex Pad Shapes "" {#v5_pcb_complex_pads} +**Goal:** +Add capability to create complex pad shapes from existing primitives such as arcs, +segments, and circles or polygons. + +**Task:** +- Add new complex pad type. +- Add code to load and save complex pad type. +- Add code to convert complex pad type to polygon for DRC testing. +- Add code to DRC to support complex pad types. +- Add code to footprint editor to create complex pad types. + +**Dependencies:** +- [Unified geometry library.](#v5_geometry_lib) + +**Progress:** +- In progress. + + +# GerbView: Gerber File Viewer # {#v5_gerbview} + +This section covers the source code for the GerbView gerber file viewer. + +## Graphics Abstraction Layer ## {#v5_gerbview_gal} +**Goal:** + +Graphics rendering unification. + +**Task:** +- Port graphics rendering layer to GAL. + +**Dependencies:** +- None. + +**Status** +- No progress. + +# Documentation # {#v5_documentation} +This section defines the tasks for both the user and developer documentation. + +## Grammar Check ## {#v5_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 ## {#v5_doc_maintenance} +**Task:** +- Keep screen shots current with the source changes. + +**Dependencies:** +- None. + +**Status:** +- No progress. + +## Convert Developer Documentation to Markup/down Format ## {#v5_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:** +- In progress. Most of the developer documentation has been convert to + [Doxygen markdown](http://www.stack.nl/~dimitri/doxygen/manual/markdown.html) + and the [output][kicad-docs] is rebuilt automatically when a commit is + made to the KiCad repo. + +[kicad-website]:http://kicad-pcb.org/ +[kicad-docs]:http://ci.kicad-pcb.org/job/kicad-doxygen/ws/Documentation/doxygen/html/index.html diff --git a/Doxyfile b/Doxyfile index eb066f7bed..7d445d4cbc 100644 --- a/Doxyfile +++ b/Doxyfile @@ -647,6 +647,7 @@ WARN_LOGFILE = INPUT = Documentation/development/coding-style-policy.md \ Documentation/development/stable-release-policy.md \ + Documentation/development/road-map-r5.md \ Documentation/development/road-map.md \ Documentation/development/compiling.md \ kicad \ From 7c637ea7bee9d40cf3f3497930db2499696907fc Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 4 Feb 2016 17:49:20 +0100 Subject: [PATCH 6/6] github fix and comment improvements: * Fix a StrPrintf() %s count mismatch bug * Better comments * Use std::string::data() instead of a ref to the first char to get the str::string buffer (should not change anything with GNU lib) --- pcbnew/github/github_plugin.cpp | 23 +++++++++++------------ pcbnew/pcb_parser.cpp | 4 ++-- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/pcbnew/github/github_plugin.cpp b/pcbnew/github/github_plugin.cpp index 9fa4e628fe..ef592ea19a 100644 --- a/pcbnew/github/github_plugin.cpp +++ b/pcbnew/github/github_plugin.cpp @@ -194,7 +194,7 @@ MODULE* GITHUB_PLUGIN::FootprintLoad( const wxString& aLibraryPath, if( it != m_gh_cache->end() ) // fp_name is present { - wxMemoryInputStream mis( &m_zip_image[0], m_zip_image.size() ); + wxMemoryInputStream mis( m_zip_image.data(), m_zip_image.size() ); // This decoder should always be UTF8, since it was saved that way by git. // That is, since pretty footprints are UTF8, and they were pushed to the @@ -205,21 +205,17 @@ MODULE* GITHUB_PLUGIN::FootprintLoad( const wxString& aLibraryPath, if( zis.OpenEntry( *entry ) ) { 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 MODULE* ret = (MODULE*) m_parser->Parse(); -#else - PCB_PARSER parser( &reader ); - MODULE* ret = (MODULE*) parser.Parse(); -#endif - - // Dude, the footprint name comes from the file name in - // a github library. Zero out the library name, we don't know it here. - // Some caller may set the library nickname, one such instance is - // FP_LIB_TABLE::FootprintLoad(). + // In a github library, (as well as in a "KiCad" library) the name of + // the pretty file defines the footprint name. That filename trumps + // any name found in the pretty file; any name in the pretty file + // must be ignored here. Also, the library nickname is unknown in + // this context so clear it just in case. ret->SetFPID( fp_name ); return ret; @@ -541,11 +537,14 @@ void GITHUB_PLUGIN::remoteGetZip( const wxString& aRepoURL ) throw( IO_ERROR ) } catch( const IO_ERROR& ioe ) { - // https "GET" has faild, report this to API caller. + // https "GET" has failed, report this to API caller. // Note: kcurl.Perform() does not return an error if the file to download is not found + static const char errorcmd[] = "http GET command failed"; // Do not translate this message + UTF8 fmt( _( "%s\nCannot get/download Zip archive: '%s'\nfor library path: '%s'.\nReason: '%s'" ) ); std::string msg = StrPrintf( fmt.c_str(), + errorcmd, zip_url.c_str(), TO_UTF8( aRepoURL ), TO_UTF8( ioe.errorText ) diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index e6177e6162..d0b858c70b 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2695,12 +2695,12 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) case T_chamfer: if( !zone->GetIsKeepout() ) // smoothing has meaning only for filled zones - zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_CHAMFER ); + zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_CHAMFER ); break; case T_fillet: if( !zone->GetIsKeepout() ) // smoothing has meaning only for filled zones - zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_FILLET ); + zone->SetCornerSmoothingType( ZONE_SETTINGS::SMOOTHING_FILLET ); break; default: