This repository has been archived by the owner on Oct 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 176
kicad_mod_generator
Thomas Pointhuber edited this page Aug 25, 2016
·
13 revisions
Idea would be generating models using python as base language. The whole framework/library should be made in a way where scripting a component is as simple as possible without too much general/structural/reppetive code for each component script.
Current project members:
- @pointhi (irc: pointhi) (footprint generator)
- @iromero91 (irc: cyborg_ar) (3d model generator)
using an argparse similar api, which is build in a way to support different types of input (csv, yml, call inside python script). So you simply add something like this as generic structure:
from kicad_mod_generator import parser
parser = KicadModParser(MyFootprint) # it's only a concept
class MyFootprint(KicadFootprint):
def __init__(self):
pass
def arguments(self):
parser.addArgument('name', type=str)
parser.addArgument('datasheet', type=str)
parser.addArgument('dimension_A', type=int)
parser.addArgument('dimension_B', type=int)
parser.addArgument('Dimension_C', type=int)
def generate_footprint(self, out_file):
return None
def generate_3d_model(self, out_file):
return None
if __name__ == '__main__':
parser.parse()
The script should be able to be called like:
./demo_footprint.py spec1.csv spec2.csv spec3.yml -v dir=Demo.pretty
But also inside python (where I have to think of an implementation ^^)