static void export_vrml_via( BOARD* pcb, SEGVIA* via ) //{{{
{
    double x, y, r, hole;
    int    top_layer, bottom_layer;

    r    = via->GetWidth() / 2;
    hole = via->GetDrillValue() / 2;
    x    = via->GetStart().x;
    y    = via->GetStart().y;
    via->ReturnLayerPair( &top_layer, &bottom_layer );

    // Export the via padstack
    export_round_padstack( pcb, x, y, r, bottom_layer, top_layer );

    // Drill a hole
    export_vrml_hole( via_triangles[via->GetShape()], top_layer, bottom_layer, x, y, hole );
}
static void export_vrml_via( MODEL_VRML& aModel, BOARD* pcb, const VIA* via )
{
    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;
    x   = via->GetStart().x * aModel.scale;
    y   = via->GetStart().y * aModel.scale;
    via->LayerPair( &top_layer, &bottom_layer );

    // do not render a buried via
    if( top_layer != F_Cu && bottom_layer != B_Cu )
        return;

    // Export the via padstack
    export_round_padstack( aModel, pcb, x, y, r, bottom_layer, top_layer, hole );
}