ODB_Exporter.py 529 Bytes
Newer Older
nats's avatar
nats committed
1 2 3
import sys
import os

nats's avatar
wip  
nats committed
4
from odb_data import *
nats's avatar
nats committed
5 6

from pcbnew import *
nats's avatar
wip  
nats committed
7

nats's avatar
nats committed
8
odb_name = sys.argv[1]
nats's avatar
nats committed
9 10
step_name = sys.argv[2]
brd_name = sys.argv[3]
nats's avatar
nats committed
11 12 13 14

board = LoadBoard(brd_name)

plot_dir = "%s\/" % odb_name
nats's avatar
nats committed
15
odb_dir_root = plot_dir+"\/steps\/"+step_name
nats's avatar
nats committed
16 17

# Generate EDA data
nats's avatar
nats committed
18 19 20
#if(not os.path.exists(odb_dir_root + "\/eda\/")):
	#print "Bad file tree\n"
	#exit()
nats's avatar
nats committed
21

nats's avatar
nats committed
22 23 24
#if(not os.path.exists(odb_dir_root + "\/eda\/")):
	#print "Bad file tree\n"
	#exit()
nats's avatar
nats committed
25

nats's avatar
nats committed
26
#s_data = gen_data_file(board);
nats's avatar
wip  
nats committed
27
odb_instance = ODB_GEN()
nats's avatar
nats committed
28
odb_instance.gen_comp_file(board)