diff --git a/python_plugins/odb_data.py b/python_plugins/odb_data.py index bc14ab437f3ce24caf2c31e74357a452b1749163..af85ea74b77ee2dfd28e08360c12f2e6b4955c43 100644 --- a/python_plugins/odb_data.py +++ b/python_plugins/odb_data.py @@ -17,25 +17,23 @@ def gen_data_file(b): s_layers = s_layers + l + " " def gen_comp_file(b): - # + # Generate the component file and package file modules = b.GetModules() for m in modules: - # pos = m.GetPosition() - # ori = m.GetOrientation() - # ref = m.GetReference() - # nb_pads = m.GetPadCount() - # pads = m.Pads() - # print ref - # print nb_pads - # print pos - # print ori - # for p in pads: - # print p.GetPosition() + print m.GetName() + create_package(m) create_component(m) def create_component(m): # Create module section in file +def create_package(m): + # Add package entry to EDA file + # Need to get the footprint name / size / pad + # Check if already existing + # If not create it + # return the dict entry + return class NewApiCompat: #Please remove this code when new kicad python API will be the standard @@ -66,4 +64,4 @@ class NewApiCompat: mask = [c for c in layerset.FmtBin() if c in ('0','1')] mask.reverse() ids = [i for i, c in enumerate(mask) if c == '1'] - return tuple(self.layer_names[i] for i in ids) \ No newline at end of file + return tuple(self.layer_names[i] for i in ids)