Example #1
0
 def toS(parent, name):
     i = [
         SizeField.toS(parent, 'size'),
         DistanceField.toS(parent, 'thickness')
     ]
     if parent.italic:
         i.append('italic')
     return S(name, i)
Example #2
0
 def toS(parent, name):
     return S(name, [S(str(l.num), [l.name, l.t]) for l in parent.layers])
Example #3
0
 def toS(self, name):
     return S(name, [self.name, self.t, self.shape] + self.fieldsToS())
Example #4
0
 def toS(self, name):
     if self.t:
         return S(name, [self.t, self.text] + self.fieldsToS())
     else:
         return S(name, [self.text] + self.fieldsToS())
Example #5
0
 def toS(self, name):
     return S(name, self.fieldsToS())
Example #6
0
 def toS(parent, name):
     return S(name, [hex(parent.__getattribute__(name))[2:].upper()])
Example #7
0
 def toS(parent, name):
     f = parent.__getattribute__(name)
     return S(name, [nm(f[0]), nm(f[1])])
Example #8
0
 def toS(self):
     return S('kicad_pcb', self.fieldsToS())
Example #9
0
 def toS(parent, name):
     return S(name, [parent.hatchtype, nm(parent.hatchsize)])
Example #10
0
 def toS(parent, name):
     return S(name, [hex(parent.lselect1) + '_' + hex(parent.lselect2)[2:]])
Example #11
0
 def toS(parent, name):
     f = parent.__getattribute__(name)
     if len(f) == 3:
         return S(name, [nm(f[0]), nm(f[1]), str(f[2])])
     else:
         return S(name, [nm(f[0]), nm(f[1])])
Example #12
0
 def toS(parent, name):
     return S(name, [str(parent.net[0]), parent.net[1]])
Example #13
0
 def toS(parent, name):
     return [S(name, [n]) for n in parent.nets]
Example #14
0
 def toS(self, name):
     return S(name, [self.name] + self.fieldsToS())
Example #15
0
 def toS(parent, name):
     i = [parent.connect] if parent.connect != 'thermal' else []
     return S(name, i + [S('clearance', [nm(parent.clearance)])])
Example #16
0
 def toS(parent, name):
     r = []
     for k, v in parent.nets.items():
         r.append(S(name, [str(k), v]))
     return r
Example #17
0
 def toS(parent, name):
     return S(name, [S(k, ['not_allowed']) for k in parent.keepouts])
Example #18
0
 def toS(parent, name):
     return S(name, [str(parent.__getattribute__(name))])
Example #19
0
 def toS(parent, name):
     return S(
         name,
         [S('pts', [S('xy', [nm(p[0]), nm(p[1])]) for p in parent.pts])])
Example #20
0
 def toS(parent, name):
     return S(name, ['true' if parent.__getattribute__(name) else 'false'])
Example #21
0
 def toS(parent, name):
     return S(name, ['yes' if parent.__getattribute__(name) else 'no'])