mirror of
git://projects.qi-hardware.com/xue.git
synced 2024-11-16 10:48:07 +02:00
kccomp.py has been fixed
This commit is contained in:
parent
eea70b29e4
commit
61118e4895
@ -20,6 +20,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
"""
|
||||
|
||||
from datetime import datetime
|
||||
from math import ceil
|
||||
|
||||
|
||||
class KcLibrary:
|
||||
def __init__(self, name):
|
||||
@ -71,7 +73,8 @@ class KcUnit:
|
||||
sl = (len( ll.name + " " + part + " " + lr.name))/2
|
||||
|
||||
H = max(len(self.left_pins),len(self.right_pins),10)/2*100
|
||||
W = max(len(self.top_pins)+6,len(self.bot_pins)+6,sl)/2*100
|
||||
W = max(len(self.top_pins)*60+len(ll.name)*40+40,len(self.bot_pins)*60+len(lr.name)*40+40,sl/2*100)
|
||||
W = int(ceil(W/100.0)*100)
|
||||
|
||||
of.writelines('S ' + str(-W) + ' ' + str(-H-100) + ' ' + str(W) + ' ' + str(H+100) + ' ' + str(self.id_unit) +' 1 0 f\n')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user