Newer
Older
#!/usr/bin/env python3
"""
This module call script 'paperbot_dsn.py' to generate a DSN file
for auto_router. An interface will pop up for the user to confirm wiring design,
if a user does not want to change anything, one can just simply close the window.
Routing information will be stored automatically in the same directory.
The routing information will be read and draw the corresponding line on the dxf file
path information needed:
- dsnwritier(sesreader) dir
- modules library dir
- mechanical design drawing file
- dsn/ses/dxf file name and (optional:dir)
"""
dsnwritier_dir='/home/jingyan/Documents/summer_intern_lemur/roco_electrical/dsn_python'
module_libpath='/home/jingyan/Documents/summer_intern_lemur/roco_electrical/libraries/kicad-ESP8266/ESP8266.pretty/'
dwg_path='/home/jingyan/Documents/summer_intern_lemur/roco_electrical/dsn_line_test.dxf'
# paperbot_draw.pre_process(dwg_path,save_name)
paperbot_dsn.brd_design(dwg_path,0,module_libpath,save_name)
unrouted_dsn_file=save_name+'.dsn'
subprocess.call(['java','-jar','freeRouting.jar','-de',unrouted_dsn_file,'-white','-s'])
wiring_path=find_wire(save_name)
paperbot_draw.post_process(dwg_path,wiring_path)