diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 16694ab409..9d71d83836 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -198,7 +198,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError ) { // get all the DRAWSEGMENTS into 'items', then look for layer == EDGE_N, // and those segments comprize the board's perimeter. - const KICAD_T scanDRAWSEGMENTS[] = { TYPEDRAWSEGMENT, EOT }; + static const KICAD_T scanDRAWSEGMENTS[] = { TYPEDRAWSEGMENT, EOT }; items.Collect( aBoard, scanDRAWSEGMENTS ); bool haveEdges = false; @@ -304,7 +304,48 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError ) } } + //------------------------------------------------- + { + static const KICAD_T scanZONEs[] = { TYPEZONE_CONTAINER, EOT }; + items.Collect( aBoard, scanZONEs ); + + for( int i=0; iGetLayerName( item->GetLayer() ); + COPPER_PLANE* plane = new COPPER_PLANE( pcb->structure ); + PATH* polygon = new PATH( plane, T_polygon ); + + plane->path = polygon; + plane->name = CONV_TO_UTF8( item->m_Netname ); + + polygon->layer_id = CONV_TO_UTF8( layerName ); + + int count = item->m_Poly->corner.size(); + for( int j=0; jm_Poly->corner[j].x, item->m_Poly->corner[j].y ); + + polygon->points.push_back( mapPt(point) ); + } + + pcb->structure->planes.push_back( plane ); + } + } + //----------------------------- + { + // get all the DRAWSEGMENTS into 'items', then look for layer == EDGE_N, + // and those segments comprize the board's perimeter. + static const KICAD_T scanPADnVIAs[] = { TYPEPAD, TYPEVIA, EOT }; + items.Collect( aBoard, scanPADnVIAs ); + + for( int i=0; iShow( 0, std::cout ); + } + } //------------------------------------------------------