From 9191f28aebe3a9ac8dff6a84b7ce7466f67e3853 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 27 Feb 2013 09:54:29 -0600 Subject: [PATCH] specctra_export to handle Edge Cuts graphics in modules --- pcbnew/specctra_export.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 8697ec63cc..12e3a1a0fe 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -767,36 +767,29 @@ PADSTACK* SPECCTRA_DB::makeVia( const SEGVIA* aVia ) void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ERROR ) { - TYPE_COLLECTOR items; + TYPE_COLLECTOR items; // get all the DRAWSEGMENTS into 'items', then look for layer == EDGE_N, // and those segments comprise the board's perimeter. - static const KICAD_T scanDRAWSEGMENTS[] = { PCB_LINE_T, EOT }; + static const KICAD_T scan_graphics[] = { PCB_LINE_T, PCB_MODULE_EDGE_T, EOT }; - items.Collect( aBoard, scanDRAWSEGMENTS ); - - bool haveEdges = false; + items.Collect( aBoard, scan_graphics ); for( int i=0; iType() == PCB_LINE_T ); - - if( item->GetLayer() != EDGE_N ) + if( items[i]->GetLayer() != EDGE_N ) { items.Remove( i ); } - else + else // remove graphics not on EDGE_N layer { - haveEdges = true; ++i; D( item->Show( 0, std::cout );) } } - if( haveEdges ) + if( items.GetCount() ) { PATH* path = new PATH( boundary ); boundary->paths.push_back( path );