diff --git a/python/pcb.py b/python/pcb.py index 946d70302690148dbaa56c93682f6cbafc7ec1b4..6e129f4fbba85172408ca20544d103b026236fc5 100755 --- a/python/pcb.py +++ b/python/pcb.py @@ -34,6 +34,8 @@ output = "top, bottom, labels, holes, and exterior" #output = "exterior" #output = "top solder mask" #output = "bottom solder mask" +#output = "labels" +#output = "labels minus top mask" ############################################################ # import @@ -969,6 +971,8 @@ class PCB: self.mask = add(self.mask,move(part,mask,mask)) self.mask = add(self.mask,move(part,mask,-mask)) return self + def text(self,str,x,y,line=0.01,color=White): + self.labels = add(self.labels,text('pcb.py',x+.17,V3.y,line=line,color=color).shape) class point: def __init__(self,x,y,z=0): @@ -10218,6 +10222,8 @@ pcb = wire(pcb,w, point(V7.x,V6.y,zb), V7.pad[2]) +pcb.text('pcb.py',x,V3.y,line=0.01,color=White) + ############################################################ # select output ############################################################ @@ -10276,6 +10282,12 @@ elif (output == "top solder mask"): elif (output == "bottom solder mask"): outputs["function"] = color(White,pcb.mask) outputs["layers"] = [zb] +elif (output == "labels"): + outputs["function"] = color(White,pcb.labels) + outputs["layers"] = [zt] +elif (output == "labels minus top mask"): + outputs["function"] = subtract(color(White,pcb.labels),color(White,pcb.mask)) + outputs["layers"] = [zt] else: print("oops -- don't recognize output")