def itemize(self): return Item('Pin', [ nm(self.x), nm(self.y), nm(self.dimater), nm(self.spacing), nm(self.mask), nm(self.drill), StringValue(self.name), StringValue(self.number), flags(self.flags) ])
def itemize(self): return Item('Pad', [ nm(self.x1), nm(self.y1), nm(self.x2), nm(self.y2), nm(self.thick), nm(self.spacing), nm(self.mask), StringValue(self.name), StringValue(self.number), flags(self.flags) ])
def itemize(self): items = [] for c in self.comments: items.append(Item("comment", [c])) items.append(Item("FileVersion", [self.version])) items.append(Item("PCB", [self.name, nm(self.width), nm(self.height)])) items.append( Item("Grid", [ nm(self.gridStep), nm(self.gridX), nm(self.gridY), self.gridVisible ])) items.append( Item("PolyArea", [NumericValue(self.polyArea)])) #helper function number items.append(Item("Thermal", [NumericValue(self.thermal)])) items.append( Item("DRC", [ nm(self.minSpace), nm(self.minOverlap), nm(self.minWidth), nm(self.minSilk), nm(self.minDrill), nm(self.minRing) ])) items.append(Item("Flags", [flags(self.flags)], True)) items.append( Item("Groups", [StringValue(':'.join([','.join(g) for g in self.groups]))], True)) items.append( Item("Styles", [StringValue(':'.join([str(s) for s in self.styles]))], False)) for s in self.symbols: items.append(s.itemize()) for k, v in self.attributes.items(): items.append( Item('Attribute', [StringValue(k), StringValue(v)], True)) for v in self.vias: items.append(v.itemize()) for e in self.elements: items.append(e.itemize()) for r in self.rats: items.append(r.itemize()) for l in self.layers: items.append(l.itemize()) items.append(self.netlist.itemize()) return items
def itemize(self): return Item('Layer', [ NumericValue(self.number), StringValue(self.name), flags(self.flags) ], True, [ g.itemize() for g in (self.lines + self.texts + self.arcs + self.polygons) ])
def itemize(self): return Item('Text', [ nm(self.x), nm(self.y), NumericValue(self.dir), NumericValue(self.scale), StringValue(self.string), flags(self.flags) ])
def itemize(self): items = [] for k, v in self.attributes.items(): items.append( Item('Attribute', [StringValue(k), StringValue(v)], True)) return Item( 'Element', [ flags(self.flags), StringValue(self.description), StringValue(self.name), StringValue(self.value), nm(self.x), nm(self.y), nm(self.textx), nm(self.texty), NumericValue(self.tdir), NumericValue(self.tscale), flags(self.flags) ], False, items + [ l.itemize() for l in (self.lines + self.arcs + self.pins + self.pads) ])
def itemize(self): return Item('Net', [StringValue(self.name), StringValue(self.style)], True, [c.itemize() for c in self.connects])
def itemize(self): return Item('Connect', [StringValue(self.part + '-' + self.pin)], True)