Loading pcbnew/specctra_export.cpp +6 −13 Original line number Original line Diff line number Diff line Loading @@ -772,31 +772,24 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER // get all the DRAWSEGMENTS into 'items', then look for layer == EDGE_N, // get all the DRAWSEGMENTS into 'items', then look for layer == EDGE_N, // and those segments comprise the board's perimeter. // 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 ); items.Collect( aBoard, scan_graphics ); bool haveEdges = false; for( int i=0; i<items.GetCount(); ) for( int i=0; i<items.GetCount(); ) { { DRAWSEGMENT* item = (DRAWSEGMENT*) items[i]; if( items[i]->GetLayer() != EDGE_N ) wxASSERT( item->Type() == PCB_LINE_T ); if( item->GetLayer() != EDGE_N ) { { items.Remove( i ); items.Remove( i ); } } else else // remove graphics not on EDGE_N layer { { haveEdges = true; ++i; ++i; D( item->Show( 0, std::cout );) D( item->Show( 0, std::cout );) } } } } if( haveEdges ) if( items.GetCount() ) { { PATH* path = new PATH( boundary ); PATH* path = new PATH( boundary ); boundary->paths.push_back( path ); boundary->paths.push_back( path ); Loading Loading
pcbnew/specctra_export.cpp +6 −13 Original line number Original line Diff line number Diff line Loading @@ -772,31 +772,24 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER // get all the DRAWSEGMENTS into 'items', then look for layer == EDGE_N, // get all the DRAWSEGMENTS into 'items', then look for layer == EDGE_N, // and those segments comprise the board's perimeter. // 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 ); items.Collect( aBoard, scan_graphics ); bool haveEdges = false; for( int i=0; i<items.GetCount(); ) for( int i=0; i<items.GetCount(); ) { { DRAWSEGMENT* item = (DRAWSEGMENT*) items[i]; if( items[i]->GetLayer() != EDGE_N ) wxASSERT( item->Type() == PCB_LINE_T ); if( item->GetLayer() != EDGE_N ) { { items.Remove( i ); items.Remove( i ); } } else else // remove graphics not on EDGE_N layer { { haveEdges = true; ++i; ++i; D( item->Show( 0, std::cout );) D( item->Show( 0, std::cout );) } } } } if( haveEdges ) if( items.GetCount() ) { { PATH* path = new PATH( boundary ); PATH* path = new PATH( boundary ); boundary->paths.push_back( path ); boundary->paths.push_back( path ); Loading