From c1acd5902d03943818acdb514d2c89f9dbc02c7b Mon Sep 17 00:00:00 2001 From: Neil Gershenfeld <gersh@cba.mit.edu> Date: Sun, 27 Oct 2019 16:57:50 -0400 Subject: [PATCH] wip --- python/pcb.py | 51 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/python/pcb.py b/python/pcb.py index f56a30c..666b853 100755 --- a/python/pcb.py +++ b/python/pcb.py @@ -6,7 +6,7 @@ # usage: # pcb.py | frep.py [dpi [filename]] # -# Neil Gershenfeld 9/30/19 +# Neil Gershenfeld 10/27/19 # (c) Massachusetts Institute of Technology 2019 # # This work may be reproduced, modified, distributed, @@ -20,9 +20,9 @@ # uncomment for desired output: # -#output = "top, labels, and exterior" +output = "top, labels, and exterior" #output = "top, bottom, labels, and exterior" -output = "top, bottom, labels, holes, and exterior" +#output = "top, bottom, labels, holes, and exterior" #output = "top traces" #output = "top traces and exterior" #output = "bottom traces reversed" @@ -1165,6 +1165,47 @@ class choke(part): # connectors # +class RCWL0516(part): + # + # RCWL-0516 Doppler radar + # + def __init__(self,value=''): + pad_header = cube(-.065,.065,-.025,.025,0,0) + self.value = value + self.pad = [point(0,0,0)] + self.labels = [] + # + # pin 1: 3.3V + # + self.shape = translate(pad_header,.107,-.2,0) + self.shape = add(self.shape,cylinder(.172,-.2,0,0,.025)) + self.pad.append(point(.107,-.2,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'3.3V')) + # + # pin 2: GND + # + self.shape = add(self.shape,translate(pad_header,-.107,-.1,0)) + self.pad.append(point(-.107,-.1,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'GND')) + # + # pin 3: OUT + # + self.shape = add(self.shape,translate(pad_header,.107,0,0)) + self.pad.append(point(.107,0,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'OUT')) + # + # pin 4: VIN + # + self.shape = add(self.shape,translate(pad_header,-.107,.1,0)) + self.pad.append(point(-.107,.1,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'VIN')) + # + # pin 4: CDS + # + self.shape = add(self.shape,translate(pad_header,.107,.2,0)) + self.pad.append(point(.107,.2,0)) + self.labels.append(self.text(self.pad[-1].x,self.pad[-1].y,self.pad[-1].z,'CDS')) + class microSD(part): # # microSD @@ -5200,10 +5241,10 @@ elif (output == "bottom traces reversed and exterior"): outputs["layers"] = [zb] elif (output == "interior"): outputs["function"] = color(White,pcb.interior) - outputs["layers"] = [zb] + outputs["layers"] = [zt] elif (output == "exterior"): outputs["function"] = color(White,pcb.exterior) - outputs["layers"] = [zb] + outputs["layers"] = [zt] elif (output == "holes"): outputs["function"] = color(White, subtract(add(pcb.exterior,pcb.interior),pcb.holes)) -- GitLab