Merge branch 'polygon' into dev
Merge branch 'polygon' into dev
Polygon renders in both modes, but clearing needs to be done for 2D
context. Need to convert 2D mode to use the layer manager for rendering

--- a/src/data/pcb/SoftRockLiteIIRX.pcb
+++ b/src/data/pcb/SoftRockLiteIIRX.pcb
@@ -10,7 +10,7 @@
 PolyArea[200000000.000000]
 Thermal[0.500000]
 DRC[600 600 600 600 1300 700]
-Flags("nameonpcb,uniquename")
+Flags("nameonpcb,alldirection")
 Groups("1,c:2:3:4:5:6,s:7:8")
 Styles["Signal,1500,4200,2600,1000:Power,2500,6000,3500,1000:Fat,4000,15000,12700,1000:Skinny,600,2402,1181,600"]
 
@@ -792,7 +792,6 @@
 Via[171000 60500 4200 2000 0 2600 "" ""]
 Via[122500 25000 4200 2000 0 2600 "" ""]
 Via[141000 22000 4200 2000 0 2600 "" ""]
-Via[4000 20500 4200 2000 0 2600 "" ""]
 Via[145000 63000 4200 2000 0 2600 "" ""]
 Via[65500 67000 4200 2000 0 2600 "" ""]
 Via[70500 71500 4200 2000 0 2600 "" ""]
@@ -802,15 +801,16 @@
 Via[155000 32000 4200 2000 0 2600 "" ""]
 Via[165000 56000 4200 2000 0 2600 "" ""]
 Via[160500 11500 4200 2000 0 2600 "" ""]
+Via[163000 32000 4200 2000 0 2600 "" ""]
 Via[155000 37500 4200 2000 0 2600 "" ""]
-Via[163000 32000 4200 2000 0 2600 "" ""]
-Via[52000 62500 4200 2000 0 2600 "" ""]
-Via[108000 85500 4200 2000 0 2600 "" ""]
+Via[52000 62500 4700 2000 0 2600 "" "thermal(0-2,5S)"]
+Via[108000 85500 4200 2000 0 2600 "" "thermal(5S)"]
+Via[4000 20500 4200 2000 0 2600 "" "thermal(5S)"]
 
 Element["" "HC49U_1" "X1" "rect_100" 22000 9000 -11000 6500 0 100 ""]
 (
 	Pin[10000 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2,thermal(5+)"]
 	ElementLine [-20500 -5000 -20500 5000 1000]
 	ElementLine [20500 -5000 20500 5000 1000]
 	ElementLine [-17700 -7500 17700 -7500 1000]
@@ -822,7 +822,7 @@
 
 	)
 
-Element["" "TO92_tri" "Q1" "unknown" 66000 14000 6000 -9400 0 100 ""]
+Element["" "TO92_tri" "Q1" "unknown" 66000 14000 6500 -7000 0 100 ""]
 (
 	Pin[0 5000 4400 2000 5000 3000 "3" "3" ""]
 	Pin[-2400 0 4400 2000 5000 3000 "2" "2" ""]
@@ -907,6 +907,410 @@
 
 	)
 
+Element["hidename" "SIP3" "AUD" "unknown" 7000 63000 -1000 3000 3 100 ""]
+(
+	Pin[0 0 6000 2000 6600 2800 "1" "1" ""]
+	Pin[0 10000 6000 2000 6600 2800 "2" "2" "thermal(0+,5+)"]
+	Pin[0 20000 6000 2000 6600 2800 "3" "3" ""]
+
+	)
+
+Element["" "SIP2" "ANT" "unknown" 247500 73000 -1000 -6500 1 100 ""]
+(
+	Pin[0 0 6000 2000 6600 2800 "1" "1" ""]
+	Pin[0 10000 6000 2000 6600 2800 "2" "2" ""]
+
+	)
+
+Element["" "ind_180" "L1" "unknown" 224000 69000 -6500 -20500 0 100 ""]
+(
+	Pin[-5000 9000 5400 2000 5400 3000 "2" "2" ""]
+	Pin[5000 -9000 5400 2000 5400 3000 "1" "1" ""]
+	ElementLine [5000 -3700 5000 14000 1000]
+	ElementLine [-5000 -14000 -5000 3700 1000]
+	ElementLine [-5000 14000 5000 14000 1000]
+	ElementLine [-5000 -14000 5000 -14000 1000]
+
+	)
+
+Element["onsolder" "1206_2" "C14" "0.01uF" 214000 60000 1000 10500 0 100 "auto"]
+(
+	Pad[6400 0 6400 0 6600 2000 6600 "1" "1" "onsolder,square,edge2"]
+	Pad[-6400 0 -6400 0 6600 2000 6600 "2" "2" "onsolder,square"]
+
+	)
+
+Element["" "rect_100" "C3" "unknown" 237500 67500 -2500 -9500 0 100 ""]
+(
+	Pin[0 10000 5400 2000 5400 3000 "2" "2" ""]
+	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
+	ElementLine [3600 -3300 3600 13600 1000]
+	ElementLine [-3600 -3300 -3600 13600 1000]
+	ElementLine [-3600 13600 3600 13600 1000]
+	ElementLine [-3600 -3300 3600 -3300 1000]
+
+	)
+
+Element["" "rect_100" "C4" "unknown" 209000 83000 -3000 -20500 0 100 ""]
+(
+	Pin[0 -10000 5400 2000 5400 3000 "2" "2" ""]
+	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
+	ElementLine [-3600 -13600 -3600 3300 1000]
+	ElementLine [3600 -13600 3600 3300 1000]
+	ElementLine [-3600 -13600 3600 -13600 1000]
+	ElementLine [-3600 3300 3600 3300 1000]
+
+	)
+
+Element["" "SIP2" "PWR" "unknown" 248000 19500 -16000 2000 0 100 ""]
+(
+	Pin[0 0 6000 2000 6600 2800 "1" "1" "thermal(5+)"]
+	Pin[0 -10000 6000 2000 6600 2800 "2" "2" ""]
+
+	)
+
+Element["" "res_vert_150mil" "R6" "unknown" 119500 47000 -11000 2000 0 100 ""]
+(
+	Pin[-15000 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	ElementLine [-12000 0 -3600 0 1000]
+	ElementArc [0 0 3600 3600 180 360 1000]
+
+	)
+
+Element["" "res_vert" "R5" "unknown" 119000 73000 -4500 -10500 0 100 ""]
+(
+	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	ElementLine [-6400 0 -3600 0 1000]
+	ElementArc [0 0 3600 3600 180 360 1000]
+
+	)
+
+Element["onsolder" "1206_2" "C16" "0.1uF" 89000 64900 -250 -11250 0 100 "auto"]
+(
+	Pad[0 -6400 0 -6400 6600 2000 6600 "1" "1" "onsolder,square"]
+	Pad[0 6400 0 6400 6600 2000 6600 "2" "2" "onsolder,square"]
+
+	)
+
+Element["" "rect_200" "C7" "4.7uF" 99500 60500 -13000 4000 0 100 ""]
+(
+	Pin[0 20000 5400 2000 5400 3000 "2" "2" ""]
+	Pin[0 0 5400 2000 5400 3000 "1" "1" "thermal(0+,5+)"]
+	ElementLine [3600 -3300 3600 23200 1000]
+	ElementLine [-3600 -3300 -3600 23200 1000]
+	ElementLine [-3600 23200 3600 23200 1000]
+	ElementLine [-3600 -3300 3600 -3300 1000]
+
+	)
+
+Element["" "res_vert_180mil" "R7" "4.99k" 38000 83500 -9500 -16500 0 100 ""]
+(
+	Pin[0 -18000 5400 2000 5400 3000 "1" "1" ""]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" ""]
+	ElementLine [0 -14500 0 -3600 1000]
+	ElementArc [0 0 3600 3600 90 360 1000]
+
+	)
+
+Element["" "res_vert" "R8" "4.99k" 56000 55000 -10500 -9500 0 100 ""]
+(
+	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	ElementLine [-6400 0 -3600 0 1000]
+	ElementArc [0 0 3600 3600 180 360 1000]
+
+	)
+
+Element["" "rect_100" "C9" "390pF" 66000 47000 10000 6000 0 100 ""]
+(
+	Pin[10000 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	ElementLine [-3300 -3600 13600 -3600 1000]
+	ElementLine [-3300 3600 13600 3600 1000]
+	ElementLine [13600 -3600 13600 3600 1000]
+	ElementLine [-3300 -3600 -3300 3600 1000]
+
+	)
+
+Element["" "res_vert" "R2" "10" 145500 80500 3500 -10500 0 100 ""]
+(
+	Pin[10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	ElementLine [3600 0 6400 0 1000]
+	ElementArc [0 0 3600 3600 0 360 1000]
+
+	)
+
+Element["" "res_vert" "R4" "1k" 204500 37500 -13000 -3000 0 100 ""]
+(
+	Pin[10000 0 5400 2000 5400 3000 "1" "1" "edge2,thermal(5+)"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	ElementLine [3600 0 6400 0 1000]
+	ElementArc [0 0 3600 3600 0 360 1000]
+
+	)
+
+Element["" "res_vert" "R3" "1k" 194000 47500 -13000 -3000 0 100 ""]
+(
+	Pin[10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	ElementLine [3600 0 6400 0 1000]
+	ElementArc [0 0 3600 3600 0 360 1000]
+
+	)
+
+Element["onsolder" "1206_2" "C13" "0.1uF" 234500 26100 -14050 9250 0 100 "auto"]
+(
+	Pad[0 6400 0 6400 6600 2000 6600 "1" "1" "onsolder,square"]
+	Pad[0 -6400 0 -6400 6600 2000 6600 "2" "2" "onsolder,square"]
+
+	)
+
+Element["" "TO92_tri" "U1" "unknown" 199000 11500 -17800 -7400 0 100 ""]
+(
+	Pin[-5000 0 4400 2000 5000 3000 "3" "3" "edge2"]
+	Pin[0 -2400 4400 2000 5000 3000 "2" "2" "edge2,thermal(5+)"]
+	Pin[5000 0 4400 2000 5000 3000 "1" "1" "edge2"]
+	ElementLine [-10000 4200 10000 4200 1000]
+	ElementLine [10000 -2800 10000 4200 1000]
+	ElementLine [-10000 -2800 -10000 4200 1000]
+	ElementLine [-10000 -2800 -5200 -7600 1000]
+	ElementLine [10000 -2800 5200 -7600 1000]
+	ElementLine [-5200 -7600 5200 -7600 1000]
+
+	)
+
+Element["" "diode_100" "D1" "unknown" 230000 9500 -17000 -7000 0 100 ""]
+(
+	Pin[5000 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	Pin[-5000 0 5400 2000 5400 3000 "1" "1" "square,edge2"]
+	ElementLine [-3000 4000 -1000 4000 1000]
+	ElementLine [2000 4000 5000 4000 1000]
+	ElementLine [-1000 1000 -1000 7000 1000]
+	ElementLine [2000 1000 2000 7000 1000]
+	ElementLine [-1000 4000 2000 1000 1000]
+	ElementLine [-1000 4000 2000 7000 1000]
+
+	)
+
+Element["" "TO92_tri" "Q2" "unknown" 99500 14000 8000 -12500 0 100 ""]
+(
+	Pin[0 -5000 4400 2000 5000 3000 "3" "3" ""]
+	Pin[2400 0 4400 2000 5000 3000 "2" "2" ""]
+	Pin[0 5000 4400 2000 5000 3000 "1" "1" ""]
+	ElementLine [-4200 -10000 -4200 10000 1000]
+	ElementLine [-4200 10000 2800 10000 1000]
+	ElementLine [-4200 -10000 2800 -10000 1000]
+	ElementLine [2800 -10000 7600 -5200 1000]
+	ElementLine [2800 10000 7600 5200 1000]
+	ElementLine [7600 -5200 7600 5200 1000]
+
+	)
+
+Element["" "res_vert" "R11" "10" 122500 9000 4000 4000 0 100 ""]
+(
+	Pin[10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	ElementLine [3600 0 6400 0 1000]
+	ElementArc [0 0 3600 3600 0 360 1000]
+
+	)
+
+Element["" "res_vert" "R17" "475" 109500 32000 7500 -4000 0 100 ""]
+(
+	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2,thermal(5+)"]
+	ElementLine [-6400 0 -3600 0 1000]
+	ElementArc [0 0 3600 3600 180 360 1000]
+
+	)
+
+Element["" "rect_100" "C12" "22pF" 76000 27500 -14500 -2000 0 100 ""]
+(
+	Pin[0 -10000 5400 2000 5400 3000 "2" "2" ""]
+	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
+	ElementLine [-3600 -13600 -3600 3300 1000]
+	ElementLine [3600 -13600 3600 3300 1000]
+	ElementLine [-3600 -13600 3600 -13600 1000]
+	ElementLine [-3600 3300 3600 3300 1000]
+
+	)
+
+Element["" "res_vert" "R14" "475" 76500 36500 -17500 1500 0 100 ""]
+(
+	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2,thermal(5+)"]
+	ElementLine [-6400 0 -3600 0 1000]
+	ElementArc [0 0 3600 3600 180 360 1000]
+
+	)
+
+Element["" "rect_100" "C10" "unknown" 50500 17000 -1500 4000 0 100 ""]
+(
+	Pin[0 -10000 5400 2000 5400 3000 "2" "2" ""]
+	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
+	ElementLine [-3600 -13600 -3600 3300 1000]
+	ElementLine [3600 -13600 3600 3300 1000]
+	ElementLine [-3600 -13600 3600 -13600 1000]
+	ElementLine [-3600 3300 3600 3300 1000]
+
+	)
+
+Element["" "res_vert" "R13" "10k" 20000 24500 -10000 4500 0 100 ""]
+(
+	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2,thermal(5+)"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	ElementLine [-6400 0 -3600 0 1000]
+	ElementArc [0 0 3600 3600 180 360 1000]
+
+	)
+
+Element["" "res_vert" "R12" "10k" 40000 24500 -14500 3500 0 100 ""]
+(
+	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	ElementLine [-6400 0 -3600 0 1000]
+	ElementArc [0 0 3600 3600 180 360 1000]
+
+	)
+
+Element["" "res_vert" "R15" "1k" 86500 9000 -14000 -7500 0 100 ""]
+(
+	Pin[0 10000 5400 2000 5400 3000 "1" "1" ""]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" ""]
+	ElementLine [0 3600 0 6400 1000]
+	ElementArc [0 0 3600 3600 270 360 1000]
+
+	)
+
+Element["" "res_vert" "R16" "22.1k" 86500 27000 4000 12000 0 100 ""]
+(
+	Pin[0 10000 5400 2000 5400 3000 "1" "1" "thermal(5+)"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" ""]
+	ElementLine [0 3600 0 6400 1000]
+	ElementArc [0 0 3600 3600 270 360 1000]
+
+	)
+
+Element["" "res_vert" "R9" "100" 25000 83500 -2500 -10500 0 100 ""]
+(
+	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	ElementLine [-6400 0 -3600 0 1000]
+	ElementArc [0 0 3600 3600 180 360 1000]
+
+	)
+
+Element["" "res_vert" "R10" "100" 25000 63000 -4500 -10500 0 100 ""]
+(
+	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	ElementLine [-6400 0 -3600 0 1000]
+	ElementArc [0 0 3600 3600 180 360 1000]
+
+	)
+
+Element["" "rect_100" "C5" "47nF" 129500 78500 5500 -11500 0 100 ""]
+(
+	Pin[0 -10000 5400 2000 5400 3000 "2" "2" ""]
+	Pin[0 0 5400 2000 5400 3000 "1" "1" "thermal(5+)"]
+	ElementLine [-3600 -13600 -3600 3300 1000]
+	ElementLine [3600 -13600 3600 3300 1000]
+	ElementLine [-3600 -13600 3600 -13600 1000]
+	ElementLine [-3600 3300 3600 3300 1000]
+
+	)
+
+Element["" "rect_100" "C6" "47nF" 129500 58000 6500 -13500 0 100 ""]
+(
+	Pin[0 -10000 5400 2000 5400 3000 "2" "2" ""]
+	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
+	ElementLine [-3600 -13600 -3600 3300 1000]
+	ElementLine [3600 -13600 3600 3300 1000]
+	ElementLine [-3600 -13600 3600 -13600 1000]
+	ElementLine [-3600 3300 3600 3300 1000]
+
+	)
+
+Element["onsolder" "1206_2" "C17" "0.1uF" 57500 74400 -6550 -9950 0 100 "auto"]
+(
+	Pad[0 -6400 0 -6400 6600 2000 6600 "1" "1" "onsolder,square"]
+	Pad[0 6400 0 6400 6600 2000 6600 "2" "2" "onsolder,square"]
+
+	)
+
+Element["onsolder" "1206_2" "C18" "0.1uF" 31600 75000 -19150 3150 0 100 "auto"]
+(
+	Pad[-6400 0 -6400 0 6600 2000 6600 "1" "1" "onsolder,square"]
+	Pad[6400 0 6400 0 6600 2000 6600 "2" "2" "onsolder,square,edge2"]
+
+	)
+
+Element["onsolder" "1206_2" "C21" "0.01uF" 132500 23600 -4750 16550 0 100 "auto"]
+(
+	Pad[0 6400 0 6400 6600 2000 6600 "1" "1" "onsolder,square"]
+	Pad[0 -6400 0 -6400 6600 2000 6600 "2" "2" "onsolder,square"]
+
+	)
+
+Element["onsolder" "1206_2" "C15" "0.01uF" 184000 41400 6250 13750 0 100 "auto"]
+(
+	Pad[0 -6400 0 -6400 6600 2000 6600 "1" "1" "onsolder,square"]
+	Pad[0 6400 0 6400 6600 2000 6600 "2" "2" "onsolder,square"]
+
+	)
+
+Element["" "rect_100" "C11" "unknown" 41000 34000 -4500 4500 0 100 ""]
+(
+	Pin[10000 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "1" "1" "edge2,thermal(5+)"]
+	ElementLine [-3300 -3600 13600 -3600 1000]
+	ElementLine [-3300 3600 13600 3600 1000]
+	ElementLine [13600 -3600 13600 3600 1000]
+	ElementLine [-3300 -3600 -3300 3600 1000]
+
+	)
+
+Element["" "rect_100" "C8" "390pF" 48000 70500 6500 -8700 0 100 ""]
+(
+	Pin[0 10000 5400 2000 5400 3000 "2" "2" ""]
+	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
+	ElementLine [3600 -3300 3600 13600 1000]
+	ElementLine [-3600 -3300 -3600 13600 1000]
+	ElementLine [-3600 13600 3600 13600 1000]
+	ElementLine [-3600 -3300 3600 -3300 1000]
+
+	)
+
+Element["onsolder" "1206_2" "C20" "10nF" 110500 16600 5950 3250 0 100 "auto"]
+(
+	Pad[0 6400 0 6400 6600 2000 6600 "1" "1" "onsolder,square"]
+	Pad[0 -6400 0 -6400 6600 2000 6600 "2" "2" "onsolder,square"]
+
+	)
+
+Element["" "rect_200" "C2" "4.7uF" 214000 24500 -31500 -7500 0 100 ""]
+(
+	Pin[-20000 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "1" "1" "edge2,thermal(5+)"]
+	ElementLine [-23200 3600 3300 3600 1000]
+	ElementLine [-23200 -3600 3300 -3600 1000]
+	ElementLine [-23200 -3600 -23200 3600 1000]
+	ElementLine [3300 -3600 3300 3600 1000]
+
+	)
+
+Element["" "res_vert" "R1" "10" 166000 80500 1500 -10500 0 100 ""]
+(
+	Pin[10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
+	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
+	ElementLine [3600 0 6400 0 1000]
+	ElementArc [0 0 3600 3600 0 360 1000]
+
+	)
+
 Element["" "transformer_6" "T1" "unknown" 192000 70000 12500 -17500 0 100 ""]
 (
 	Pin[6600 10000 5400 2000 5400 3000 "1" "1" ""]
@@ -931,205 +1335,10 @@
 
 	)
 
-Element["hidename" "SIP3" "AUD" "unknown" 7000 63000 -1000 3000 3 100 ""]
-(
-	Pin[0 0 6000 2000 6600 2800 "1" "1" ""]
-	Pin[0 10000 6000 2000 6600 2800 "2" "2" ""]
-	Pin[0 20000 6000 2000 6600 2800 "3" "3" ""]
-
-	)
-
-Element["" "SIP2" "ANT" "unknown" 247500 73000 -1000 -6500 1 100 ""]
-(
-	Pin[0 0 6000 2000 6600 2800 "1" "1" ""]
-	Pin[0 10000 6000 2000 6600 2800 "2" "2" ""]
-
-	)
-
-Element["" "ind_180" "L1" "unknown" 224000 69000 -6500 -20500 0 100 ""]
-(
-	Pin[-5000 9000 5400 2000 5400 3000 "2" "2" ""]
-	Pin[5000 -9000 5400 2000 5400 3000 "1" "1" ""]
-	ElementLine [5000 -3700 5000 14000 1000]
-	ElementLine [-5000 -14000 -5000 3700 1000]
-	ElementLine [-5000 14000 5000 14000 1000]
-	ElementLine [-5000 -14000 5000 -14000 1000]
-
-	)
-
-Element["onsolder" "1206_2" "C14" "0.01uF" 206400 61000 8550 11650 0 100 "auto"]
-(
-	Pad[6400 0 6400 0 6600 2000 6600 "1" "1" "onsolder,square,edge2"]
-	Pad[-6400 0 -6400 0 6600 2000 6600 "2" "2" "onsolder,square"]
-
-	)
-
-Element["" "rect_100" "C3" "unknown" 237500 67500 -2500 -9500 0 100 ""]
-(
-	Pin[0 10000 5400 2000 5400 3000 "2" "2" ""]
-	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
-	ElementLine [3600 -3300 3600 13600 1000]
-	ElementLine [-3600 -3300 -3600 13600 1000]
-	ElementLine [-3600 13600 3600 13600 1000]
-	ElementLine [-3600 -3300 3600 -3300 1000]
-
-	)
-
-Element["" "rect_100" "C4" "unknown" 209000 83000 -3000 -20500 0 100 ""]
-(
-	Pin[0 -10000 5400 2000 5400 3000 "2" "2" ""]
-	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
-	ElementLine [-3600 -13600 -3600 3300 1000]
-	ElementLine [3600 -13600 3600 3300 1000]
-	ElementLine [-3600 -13600 3600 -13600 1000]
-	ElementLine [-3600 3300 3600 3300 1000]
-
-	)
-
-Element["" "SIP2" "PWR" "unknown" 248000 19500 -16000 2000 0 100 ""]
-(
-	Pin[0 0 6000 2000 6600 2800 "1" "1" ""]
-	Pin[0 -10000 6000 2000 6600 2800 "2" "2" ""]
-
-	)
-
-Element["" "res_vert_150mil" "R6" "unknown" 119500 47000 -11000 2000 0 100 ""]
-(
-	Pin[-15000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [-12000 0 -3600 0 1000]
-	ElementArc [0 0 3600 3600 180 360 1000]
-
-	)
-
-Element["" "res_vert" "R5" "unknown" 119000 73000 -4500 -10500 0 100 ""]
-(
-	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [-6400 0 -3600 0 1000]
-	ElementArc [0 0 3600 3600 180 360 1000]
-
-	)
-
-Element["onsolder" "1206_2" "C16" "0.1uF" 89000 64900 -250 -11250 0 100 "auto"]
-(
-	Pad[0 -6400 0 -6400 6600 2000 6600 "1" "1" "onsolder,square"]
-	Pad[0 6400 0 6400 6600 2000 6600 "2" "2" "onsolder,square"]
-
-	)
-
-Element["" "rect_200" "C7" "4.7uF" 99500 60500 -13000 4000 0 100 ""]
-(
-	Pin[0 20000 5400 2000 5400 3000 "2" "2" ""]
-	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
-	ElementLine [3600 -3300 3600 23200 1000]
-	ElementLine [-3600 -3300 -3600 23200 1000]
-	ElementLine [-3600 23200 3600 23200 1000]
-	ElementLine [-3600 -3300 3600 -3300 1000]
-
-	)
-
-Element["" "res_vert_180mil" "R7" "4.99k" 38000 83500 -9500 -16500 0 100 ""]
-(
-	Pin[0 -18000 5400 2000 5400 3000 "1" "1" ""]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" ""]
-	ElementLine [0 -14500 0 -3600 1000]
-	ElementArc [0 0 3600 3600 90 360 1000]
-
-	)
-
-Element["" "res_vert" "R8" "4.99k" 56000 55000 -10500 -9500 0 100 ""]
-(
-	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [-6400 0 -3600 0 1000]
-	ElementArc [0 0 3600 3600 180 360 1000]
-
-	)
-
-Element["" "rect_100" "C9" "390pF" 66000 47000 10000 6000 0 100 ""]
-(
-	Pin[10000 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	ElementLine [-3300 -3600 13600 -3600 1000]
-	ElementLine [-3300 3600 13600 3600 1000]
-	ElementLine [13600 -3600 13600 3600 1000]
-	ElementLine [-3300 -3600 -3300 3600 1000]
-
-	)
-
-Element["" "res_vert" "R2" "10" 145500 80500 3500 -10500 0 100 ""]
-(
-	Pin[10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [3600 0 6400 0 1000]
-	ElementArc [0 0 3600 3600 0 360 1000]
-
-	)
-
-Element["" "res_vert" "R1" "10" 166000 80500 1500 -10500 0 100 ""]
-(
-	Pin[10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [3600 0 6400 0 1000]
-	ElementArc [0 0 3600 3600 0 360 1000]
-
-	)
-
-Element["" "res_vert" "R4" "1k" 204500 37500 -13000 -3000 0 100 ""]
-(
-	Pin[10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [3600 0 6400 0 1000]
-	ElementArc [0 0 3600 3600 0 360 1000]
-
-	)
-
-Element["" "res_vert" "R3" "1k" 194000 47500 -13000 -3000 0 100 ""]
-(
-	Pin[10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [3600 0 6400 0 1000]
-	ElementArc [0 0 3600 3600 0 360 1000]
-
-	)
-
-Element["" "rect_200" "C2" "4.7uF" 214000 24500 -31500 -7500 0 100 ""]
-(
-	Pin[-20000 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	ElementLine [-23200 3600 3300 3600 1000]
-	ElementLine [-23200 -3600 3300 -3600 1000]
-	ElementLine [-23200 -3600 -23200 3600 1000]
-	ElementLine [3300 -3600 3300 3600 1000]
-
-	)
-
-Element["onsolder" "1206_2" "C13" "0.1uF" 234500 26100 -14050 9250 0 100 "auto"]
-(
-	Pad[0 6400 0 6400 6600 2000 6600 "1" "1" "onsolder,square"]
-	Pad[0 -6400 0 -6400 6600 2000 6600 "2" "2" "onsolder,square"]
-
-	)
-
-Element["" "TO92_tri" "U1" "unknown" 199000 11500 -17800 -7400 0 100 ""]
-(
-	Pin[-5000 0 4400 2000 5000 3000 "3" "3" "edge2"]
-	Pin[0 -2400 4400 2000 5000 3000 "2" "2" "edge2"]
-	Pin[5000 0 4400 2000 5000 3000 "1" "1" "edge2"]
-	ElementLine [-10000 4200 10000 4200 1000]
-	ElementLine [10000 -2800 10000 4200 1000]
-	ElementLine [-10000 -2800 -10000 4200 1000]
-	ElementLine [-10000 -2800 -5200 -7600 1000]
-	ElementLine [10000 -2800 5200 -7600 1000]
-	ElementLine [-5200 -7600 5200 -7600 1000]
-
-	)
-
 Element["" "rect_200" "C1" "4.7uF" 224500 42000 5500 -11500 0 100 ""]
 (
 	Pin[0 -20000 5400 2000 5400 3000 "2" "2" ""]
-	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
+	Pin[0 0 5400 2000 5400 3000 "1" "1" "thermal(5+)"]
 	ElementLine [-3600 -23200 -3600 3300 1000]
 	ElementLine [3600 -23200 3600 3300 1000]
 	ElementLine [-3600 -23200 3600 -23200 1000]
@@ -1137,219 +1346,10 @@
 
 	)
 
-Element["" "diode_100" "D1" "unknown" 230000 9500 -17000 -7000 0 100 ""]
-(
-	Pin[5000 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	Pin[-5000 0 5400 2000 5400 3000 "1" "1" "square,edge2"]
-	ElementLine [-3000 4000 -1000 4000 1000]
-	ElementLine [2000 4000 5000 4000 1000]
-	ElementLine [-1000 1000 -1000 7000 1000]
-	ElementLine [2000 1000 2000 7000 1000]
-	ElementLine [-1000 4000 2000 1000 1000]
-	ElementLine [-1000 4000 2000 7000 1000]
-
-	)
-
-Element["" "TO92_tri" "Q2" "unknown" 99500 14000 8000 -12500 0 100 ""]
-(
-	Pin[0 -5000 4400 2000 5000 3000 "3" "3" ""]
-	Pin[2400 0 4400 2000 5000 3000 "2" "2" ""]
-	Pin[0 5000 4400 2000 5000 3000 "1" "1" ""]
-	ElementLine [-4200 -10000 -4200 10000 1000]
-	ElementLine [-4200 10000 2800 10000 1000]
-	ElementLine [-4200 -10000 2800 -10000 1000]
-	ElementLine [2800 -10000 7600 -5200 1000]
-	ElementLine [2800 10000 7600 5200 1000]
-	ElementLine [7600 -5200 7600 5200 1000]
-
-	)
-
-Element["" "res_vert" "R11" "10" 122500 9000 4000 4000 0 100 ""]
-(
-	Pin[10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [3600 0 6400 0 1000]
-	ElementArc [0 0 3600 3600 0 360 1000]
-
-	)
-
-Element["" "res_vert" "R17" "475" 109500 32000 7500 -4000 0 100 ""]
-(
-	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [-6400 0 -3600 0 1000]
-	ElementArc [0 0 3600 3600 180 360 1000]
-
-	)
-
-Element["" "rect_100" "C12" "22pF" 76000 27500 -14500 -2000 0 100 ""]
-(
-	Pin[0 -10000 5400 2000 5400 3000 "2" "2" ""]
-	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
-	ElementLine [-3600 -13600 -3600 3300 1000]
-	ElementLine [3600 -13600 3600 3300 1000]
-	ElementLine [-3600 -13600 3600 -13600 1000]
-	ElementLine [-3600 3300 3600 3300 1000]
-
-	)
-
-Element["" "res_vert" "R14" "475" 76500 36500 -17500 1500 0 100 ""]
-(
-	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [-6400 0 -3600 0 1000]
-	ElementArc [0 0 3600 3600 180 360 1000]
-
-	)
-
-Element["" "rect_100" "C10" "unknown" 50500 17000 -1500 4000 0 100 ""]
-(
-	Pin[0 -10000 5400 2000 5400 3000 "2" "2" ""]
-	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
-	ElementLine [-3600 -13600 -3600 3300 1000]
-	ElementLine [3600 -13600 3600 3300 1000]
-	ElementLine [-3600 -13600 3600 -13600 1000]
-	ElementLine [-3600 3300 3600 3300 1000]
-
-	)
-
-Element["" "res_vert" "R13" "10k" 20000 24500 -10000 4500 0 100 ""]
-(
-	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [-6400 0 -3600 0 1000]
-	ElementArc [0 0 3600 3600 180 360 1000]
-
-	)
-
-Element["" "res_vert" "R12" "10k" 40000 24500 -14500 3500 0 100 ""]
-(
-	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [-6400 0 -3600 0 1000]
-	ElementArc [0 0 3600 3600 180 360 1000]
-
-	)
-
-Element["" "res_vert" "R15" "1k" 86500 9000 -13000 -8000 0 100 ""]
-(
-	Pin[0 10000 5400 2000 5400 3000 "1" "1" ""]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" ""]
-	ElementLine [0 3600 0 6400 1000]
-	ElementArc [0 0 3600 3600 270 360 1000]
-
-	)
-
-Element["" "res_vert" "R16" "22.1k" 86500 27000 4000 12000 0 100 ""]
-(
-	Pin[0 10000 5400 2000 5400 3000 "1" "1" ""]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" ""]
-	ElementLine [0 3600 0 6400 1000]
-	ElementArc [0 0 3600 3600 270 360 1000]
-
-	)
-
-Element["" "res_vert" "R9" "100" 25000 83500 -2500 -10500 0 100 ""]
-(
-	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [-6400 0 -3600 0 1000]
-	ElementArc [0 0 3600 3600 180 360 1000]
-
-	)
-
-Element["" "res_vert" "R10" "100" 25000 63000 -4500 -10500 0 100 ""]
-(
-	Pin[-10000 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	ElementLine [-6400 0 -3600 0 1000]
-	ElementArc [0 0 3600 3600 180 360 1000]
-
-	)
-
-Element["" "rect_100" "C5" "47nF" 129500 78500 5500 -11500 0 100 ""]
-(
-	Pin[0 -10000 5400 2000 5400 3000 "2" "2" ""]
-	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
-	ElementLine [-3600 -13600 -3600 3300 1000]
-	ElementLine [3600 -13600 3600 3300 1000]
-	ElementLine [-3600 -13600 3600 -13600 1000]
-	ElementLine [-3600 3300 3600 3300 1000]
-
-	)
-
-Element["" "rect_100" "C6" "47nF" 129500 58000 6500 -13500 0 100 ""]
-(
-	Pin[0 -10000 5400 2000 5400 3000 "2" "2" ""]
-	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
-	ElementLine [-3600 -13600 -3600 3300 1000]
-	ElementLine [3600 -13600 3600 3300 1000]
-	ElementLine [-3600 -13600 3600 -13600 1000]
-	ElementLine [-3600 3300 3600 3300 1000]
-
-	)
-
-Element["onsolder" "1206_2" "C17" "0.1uF" 57500 74400 -6550 -9950 0 100 "auto"]
-(
-	Pad[0 -6400 0 -6400 6600 2000 6600 "1" "1" "onsolder,square"]
-	Pad[0 6400 0 6400 6600 2000 6600 "2" "2" "onsolder,square"]
-
-	)
-
 Element["onsolder" "1206_2" "C19" "0.1uF" 31600 55500 -9150 -5350 0 100 "auto"]
 (
 	Pad[-6400 0 -6400 0 6600 2000 6600 "1" "1" "onsolder,square"]
 	Pad[6400 0 6400 0 6600 2000 6600 "2" "2" "onsolder,square,edge2"]
-
-	)
-
-Element["onsolder" "1206_2" "C18" "0.1uF" 31600 75000 -19150 3150 0 100 "auto"]
-(
-	Pad[-6400 0 -6400 0 6600 2000 6600 "1" "1" "onsolder,square"]
-	Pad[6400 0 6400 0 6600 2000 6600 "2" "2" "onsolder,square,edge2"]
-
-	)
-
-Element["onsolder" "1206_2" "C21" "0.01uF" 132500 23600 -4750 16550 0 100 "auto"]
-(
-	Pad[0 6400 0 6400 6600 2000 6600 "1" "1" "onsolder,square"]
-	Pad[0 -6400 0 -6400 6600 2000 6600 "2" "2" "onsolder,square"]
-
-	)
-
-Element["onsolder" "1206_2" "C15" "0.01uF" 184000 41400 6250 13750 0 100 "auto"]
-(
-	Pad[0 -6400 0 -6400 6600 2000 6600 "1" "1" "onsolder,square"]
-	Pad[0 6400 0 6400 6600 2000 6600 "2" "2" "onsolder,square"]
-
-	)
-
-Element["" "rect_100" "C11" "unknown" 41000 34000 -4500 4500 0 100 ""]
-(
-	Pin[10000 0 5400 2000 5400 3000 "2" "2" "edge2"]
-	Pin[0 0 5400 2000 5400 3000 "1" "1" "edge2"]
-	ElementLine [-3300 -3600 13600 -3600 1000]
-	ElementLine [-3300 3600 13600 3600 1000]
-	ElementLine [13600 -3600 13600 3600 1000]
-	ElementLine [-3300 -3600 -3300 3600 1000]
-
-	)
-
-Element["" "rect_100" "C8" "390pF" 48000 70500 6500 -8700 0 100 ""]
-(
-	Pin[0 10000 5400 2000 5400 3000 "2" "2" ""]
-	Pin[0 0 5400 2000 5400 3000 "1" "1" ""]
-	ElementLine [3600 -3300 3600 13600 1000]
-	ElementLine [-3600 -3300 -3600 13600 1000]
-	ElementLine [-3600 13600 3600 13600 1000]
-	ElementLine [-3600 -3300 3600 -3300 1000]
-
-	)
-
-Element["onsolder" "1206_2" "C20" "10nF" 110500 16600 5950 3250 0 100 "auto"]
-(
-	Pad[0 6400 0 6400 6600 2000 6600 "1" "1" "onsolder,square"]
-	Pad[0 -6400 0 -6400 6600 2000 6600 "2" "2" "onsolder,square"]
 
 	)
 Layer(1 "top")
@@ -1432,31 +1432,11 @@
 	Line[61000 9000 66000 9000 1500 2000 "clearline"]
 	Line[66000 19000 76000 17500 1500 2000 "clearline"]
 	Line[155500 16500 162500 32000 1500 2000 "clearline"]
-	Line[7000 73000 7000 68500 1500 2000 ""]
-	Line[7000 72500 7000 77500 1500 2000 ""]
-	Line[13000 73000 2500 73000 1500 2000 ""]
-	Line[2500 66000 2500 80000 1500 2000 ""]
-	Line[48000 62500 56500 62500 1500 2000 ""]
-	Line[51000 58500 51000 65000 1500 2000 ""]
-	Line[51000 65000 51500 65500 1500 2000 ""]
-	Line[52000 64500 53000 65500 1500 2000 ""]
-	Line[53000 64000 54000 65000 1500 2000 ""]
-	Line[53500 63500 55000 63500 1500 2000 ""]
-	Line[53500 61500 55000 61500 1500 2000 ""]
-	Line[52000 60500 54000 60500 1500 2000 ""]
-	Line[51500 60000 53000 60000 1500 2000 ""]
-	Line[50000 60000 50000 61500 1500 2000 ""]
-	Line[49000 61000 49000 63500 1500 2000 ""]
-	Line[49000 63500 49500 64000 1500 2000 ""]
-	Line[50000 63500 50000 64000 1500 2000 ""]
-	Line[50000 64000 50500 64500 1500 2000 ""]
 	Polygon("clearpoly")
 	(
-		[2500 65500] [2500 80500] [46000 80500] [46000 68000] [104500 68000] 
-		[104500 50000] [75500 50000] [73000 50000] [67500 55500] [45500 55500] 
-		[43500 57500] [25500 57500] [21000 62000] [3000 62000] [3000 65500] 
-		[3000 62000] [3000 63500] [3000 65500] [2000 65500] [2000 66500] 
-		[2000 68000] [2000 66500] [3000 65500] 
+		[2500 65000] [2500 82000] [46000 82000] [46000 67500] [103000 67500] 
+		[104000 66500] [104000 49000] [74000 49000] [67500 55500] [57500 55500] 
+		[56000 57000] [19500 57000] [11500 65000] 
 	)
 )
 Layer(2 "ground")
@@ -1519,7 +1499,6 @@
 	Line[155000 56000 165500 63000 1500 2000 "clearline"]
 	Line[170000 69500 171000 60500 1500 2000 "clearline"]
 	Line[165000 56000 165000 49000 1500 2000 "clearline"]
-	Line[184024 49000 185262 47762 1500 2000 "clearline"]
 	Line[165500 63000 165000 69500 1500 2000 "clearline"]
 	Line[165000 69500 166000 80500 1500 2000 "clearline"]
 	Line[150000 76500 150000 49000 1500 2000 "clearline"]
@@ -1541,76 +1520,17 @@
 	Line[169000 32500 163000 32000 1500 2000 "clearline"]
 	Line[132500 9000 132500 17200 2500 2000 "clearline"]
 	Line[148000 22500 141000 22000 1500 2000 "clearline"]
-	Line[71500 32000 72000 32000 1500 2000 ""]
-	Line[18000 33500 40500 33500 1500 2000 ""]
 	Line[40500 33500 41000 34000 1500 2000 ""]
-	Line[41000 34000 41000 38500 1500 2000 ""]
 	Line[41000 38500 43000 40500 1500 2000 ""]
 	Line[43000 40500 59500 40500 1500 2000 ""]
 	Line[59500 40500 61500 42500 1500 2000 ""]
 	Line[61500 42500 70500 42500 1500 2000 ""]
-	Line[70500 42500 76500 36500 1500 2000 ""]
-	Line[76500 36500 86000 36500 1500 2000 ""]
 	Line[86000 36500 86500 37000 1500 2000 ""]
-	Line[81000 59000 81000 37000 1500 2000 ""]
-	Line[81000 37000 81500 36500 1500 2000 ""]
-	Line[87000 37500 104000 37500 1500 2000 ""]
-	Line[104000 37500 109500 32000 1500 2000 ""]
-	Line[81000 59000 88500 59000 1500 2000 ""]
-	Line[88500 59000 89000 58500 1500 2000 ""]
-	Line[89000 58500 97500 58500 1500 2000 ""]
-	Line[97500 58500 99500 60500 1500 2000 ""]
-	Line[57500 68000 51000 61500 1500 2000 ""]
-	Line[51000 61500 51000 40500 1500 2000 ""]
-	Line[110500 23000 110500 31000 1500 2000 ""]
-	Line[110500 31000 109750 31750 1500 2000 ""]
-	Line[109750 31750 130750 31750 1500 2000 ""]
-	Line[130750 31750 132500 30000 1500 2000 ""]
 	Line[129500 58000 128500 58000 1500 2000 ""]
 	Line[128500 58000 124500 54000 1500 2000 ""]
 	Line[124500 54000 124500 31750 1500 2000 ""]
-	Line[129500 78500 131000 78500 1500 2000 ""]
-	Line[131000 78500 140000 69500 1500 2000 ""]
 	Line[130000 58000 133500 58000 1500 2000 ""]
-	Line[133500 58000 140000 64500 1500 2000 ""]
-	Line[140000 64500 140000 69500 1500 2000 ""]
-	Line[140000 69500 139750 69750 1500 2000 ""]
-	Line[212800 53700 224500 42000 1500 2000 ""]
-	Line[214000 24500 214000 37000 1500 2000 ""]
 	Line[214000 37000 214500 37500 1500 2000 ""]
-	Line[214500 37500 219000 37500 1500 2000 ""]
-	Line[219000 37500 224000 42500 1500 2000 ""]
-	Line[248000 19500 248000 23000 1500 2000 ""]
-	Line[248000 23000 244500 26500 1500 2000 ""]
-	Line[244500 26500 228500 26500 1500 2000 ""]
-	Line[228500 26500 226500 28500 1500 2000 ""]
-	Line[226500 28500 214000 28500 1500 2000 ""]
-	Line[214000 25500 207500 25500 1500 2000 ""]
-	Line[207500 25500 199000 17000 1500 2000 ""]
-	Line[199000 17000 199000 9100 1500 2000 ""]
-	Line[184000 35000 193000 35000 1500 2000 ""]
-	Line[193000 35000 205000 23000 1500 2000 ""]
-	Line[234500 26100 234500 32500 1500 2000 ""]
-	Line[169000 37500 181500 37500 1500 2000 ""]
-	Line[181500 37500 184000 35000 1500 2000 ""]
-	Line[130000 78500 130000 83000 1500 2000 ""]
-	Line[130000 83000 134000 87000 1500 2000 ""]
-	Line[134000 87000 168000 87000 1500 2000 ""]
-	Line[168000 87000 171000 84000 1500 2000 ""]
-	Line[171000 84000 171000 78500 1500 2000 ""]
-	Line[171000 78500 175000 74500 1500 2000 ""]
-	Line[175000 74500 175000 61000 1500 2000 ""]
-	Line[175000 61000 181500 54500 1500 2000 ""]
-	Line[181500 54500 212300 54500 1500 2000 ""]
-	Line[212300 54500 212800 54000 1500 2000 ""]
-	Line[170000 49000 170000 38000 1500 2000 ""]
-	Line[170000 38000 170500 37500 1500 2000 ""]
-	Line[7000 73000 15000 73000 1500 2000 ""]
-	Line[15000 73000 18500 69500 1500 2000 ""]
-	Line[18500 69500 30000 69500 1500 2000 ""]
-	Line[30000 69500 31500 68000 1500 2000 ""]
-	Line[31500 68000 31500 34000 1500 2000 ""]
-	Line[31500 34000 31000 33500 1500 2000 ""]
 	Line[148500 22500 157000 22500 1500 2000 "clearline"]
 	Line[157000 22500 162000 17500 1500 2000 "clearline"]
 	Line[162000 17500 169000 17500 1500 2000 "clearline"]
@@ -1618,61 +1538,28 @@
 	Line[157500 27500 162500 22500 1500 2000 "clearline"]
 	Line[176500 22500 162500 22500 1500 2000 "clearline"]
 	Line[99500 9000 109300 9000 1500 2000 "clearline"]
-	Line[109300 9000 110500 10200 1500 2000 "clearline"]
+	Line[229500 32500 240000 32500 1500 2000 ""]
+	Line[234500 26100 234500 37000 1500 2000 ""]
+	Line[132500 25000 132500 35500 1500 2000 ""]
+	Line[132500 35500 132000 36000 1500 2000 ""]
+	Line[126500 30000 137500 30000 1500 2000 ""]
+	Line[110500 17500 110500 27500 1500 2000 ""]
+	Line[105500 23000 115500 23000 1500 2000 ""]
+	Line[162500 37500 175500 37500 1500 2000 ""]
+	Line[170000 54000 170000 43000 1500 2000 ""]
+	Line[81000 52500 81000 64500 1500 2000 ""]
+	Line[89000 63500 89000 54000 1500 2000 ""]
+	Line[84000 58500 94000 58500 1500 2000 ""]
+	Line[140000 64500 140000 75000 1500 2000 ""]
+	Line[220500 65000 220500 55000 1500 2000 ""]
+	Line[224500 60000 215500 60000 1500 2000 ""]
+	Line[198500 60000 207500 60000 1500 2000 "clearline"]
+	Line[57500 73000 57500 62500 1500 2000 ""]
+	Line[52500 68000 61500 68000 1500 2000 ""]
+	Line[184000 40000 184000 30000 1500 2000 ""]
+	Line[179000 35000 188500 35000 1500 2000 ""]
+	Line[175000 64000 175000 74500 1500 2000 ""]
 	Line[122500 9000 111300 9000 1500 2000 "clearline"]
-	Line[111300 9000 110300 10000 1500 2000 "clearline"]
-	Line[49000 62000 51000 60000 1500 2000 ""]
-	Line[51000 60000 51000 61000 1500 2000 ""]
-	Line[51000 61000 49000 63000 1500 2000 ""]
-	Line[49000 63000 50000 64000 1500 2000 ""]
-	Line[50000 64000 50500 64000 1500 2000 ""]
-	Line[50500 64000 51000 64500 1500 2000 ""]
-	Line[51000 64500 50500 65000 1500 2000 ""]
-	Line[50500 65000 53500 65000 1500 2000 ""]
-	Line[53500 65000 54000 64500 1500 2000 ""]
-	Line[54000 64500 54000 64000 1500 2000 ""]
-	Line[54000 64000 54500 63500 1500 2000 ""]
-	Line[54500 63500 54500 61000 1500 2000 ""]
-	Line[54500 61000 54000 60500 1500 2000 ""]
-	Line[54000 60500 53500 60500 1500 2000 ""]
-	Line[53500 60500 53000 60000 1500 2000 ""]
-	Line[53000 60000 52000 60000 1500 2000 ""]
-	Line[106500 83000 109000 83000 1500 2000 ""]
-	Line[109000 83000 110500 84500 1500 2000 ""]
-	Line[110500 84500 110500 87000 1500 2000 ""]
-	Line[110500 87000 109500 88000 1500 2000 ""]
-	Line[109500 88000 107000 88000 1500 2000 ""]
-	Line[107000 88000 105500 86500 1500 2000 ""]
-	Line[105500 86500 105500 84500 1500 2000 ""]
-	Line[105500 84500 106500 83500 1500 2000 ""]
-	Line[12000 3000 12000 15500 1500 2000 ""]
-	Line[5500 9000 18500 9000 1500 2000 ""]
-	Line[10000 24500 10000 18500 1500 2000 ""]
-	Line[10000 24500 4000 24500 1500 2000 ""]
-	Line[10000 25000 10000 31000 1500 2000 ""]
-	Line[2000 18500 2500 18500 1500 2000 ""]
-	Line[2500 18500 3000 18000 1500 2000 ""]
-	Line[3000 18000 5000 18000 1500 2000 ""]
-	Line[5000 18000 6500 19500 1500 2000 ""]
-	Line[6500 19500 6500 21000 1500 2000 ""]
-	Line[6500 21000 6000 21500 1500 2000 ""]
-	Line[6000 21500 5500 21500 1500 2000 ""]
-	Line[5500 21500 4500 22500 1500 2000 ""]
-	Line[4500 22500 4500 23500 1500 2000 ""]
-	Line[4500 23500 3500 23500 1500 2000 ""]
-	Line[3500 23500 3000 23000 1500 2000 ""]
-	Line[3000 23000 3500 22500 1500 2000 ""]
-	Line[3500 22500 2000 22500 1500 2000 ""]
-	Line[2000 22500 2000 22000 1500 2000 ""]
-	Line[2000 22000 1500 21500 1500 2000 ""]
-	Line[1500 21500 1500 19500 1500 2000 ""]
-	Line[1500 19500 2000 19000 1500 2000 ""]
-	Line[213000 61000 213000 66500 1500 2000 ""]
-	Line[213000 61500 213000 56000 1500 2000 ""]
-	Line[207500 61000 217500 61000 1500 2000 ""]
-	Line[6500 21500 6000 22000 1500 2000 ""]
-	Line[6000 22000 6000 22500 1500 2000 ""]
-	Line[6000 22500 5500 23000 1500 2000 ""]
 	Polygon("clearpoly")
 	(
 		[0 90000] [256000 90000] [256000 0] [0 0] 
@@ -1693,22 +1580,21 @@
 )
 Layer(10 "silk")
 (
-	Arc[163000 32000 3500 3500 1500 2000 0 90 ""]
-	Arc[163000 32000 3500 3500 1500 2000 90 90 ""]
-	Arc[163000 32000 3500 3500 1500 2000 180 90 ""]
-	Arc[163000 32000 3500 3500 1500 2000 -90 90 ""]
-	Arc[155000 37500 3000 3000 1500 2000 0 90 ""]
-	Arc[155000 37500 3000 3000 1500 2000 90 90 ""]
-	Arc[155000 37500 3000 3000 1500 2000 180 90 ""]
-	Arc[155000 37500 3000 3000 1500 2000 -90 90 ""]
-	Arc[108000 85500 3000 3000 1500 2000 0 -90 ""]
-	Arc[108000 85500 3000 3000 1500 2000 -90 -90 ""]
-	Arc[108000 85500 3000 3000 1500 2000 180 -90 ""]
-	Arc[108000 85500 3000 3000 1500 2000 90 -90 ""]
-	Text[12000 64000 0 100 "Ring" "clearline"]
-	Text[11000 74000 0 100 "Tip" "clearline"]
-	Text[241000 3000 0 100 "+" "clearline"]
-	Text[241500 13000 0 100 "-" "clearline"]
+	Line[136000 7000 141000 5000 1000 2000 ""]
+	Arc[108000 85500 3000 3000 600 1200 -90 -90 ""]
+	Arc[108000 85500 3000 3000 600 1200 180 -90 ""]
+	Arc[108000 85500 3000 3000 600 1200 90 -90 ""]
+	Arc[155000 37500 3000 3000 600 1200 -90 -90 ""]
+	Arc[155000 37500 3000 3000 600 1200 180 -90 ""]
+	Arc[155000 37500 3000 3000 600 1200 90 -90 ""]
+	Arc[155000 37500 3000 3000 600 1200 0 -90 ""]
+	Arc[163000 32000 3000 3000 600 1200 0 -90 ""]
+	Arc[163000 32000 3000 3000 600 1200 -90 -90 ""]
+	Arc[163000 32000 3000 3000 600 1200 180 -90 ""]
+	Arc[163000 32000 3000 3000 600 1200 90 -90 ""]
+	Arc[108000 85500 3000 3000 600 1200 0 -90 ""]
+	Text[241000 3000 0 130 "+" "clearline"]
+	Text[241000 13000 0 130 "-" "clearline"]
 	Text[56500 75500 0 100 "SoftRock" "clearline"]
 	Text[57500 82000 0 100 "Lite II" "clearline"]
 	Text[136500 29000 0 100 "QSD" "clearline"]
@@ -1716,6 +1602,9 @@
 	Text[137000 34500 0 100 "clk_0" "clearline"]
 	Text[168000 28000 0 100 "clk_1" "clearline"]
 	Text[114000 82500 0 100 "GND" "clearline"]
+	Text[12000 64000 0 100 "Ring" "clearline"]
+	Text[11000 74000 0 100 "Tip" "clearline"]
+	Text[143000 2500 0 100 "5 VDC" "clearline"]
 )
 NetList()
 (

--- a/src/js/circuit/PCB/Element.js
+++ b/src/js/circuit/PCB/Element.js
@@ -160,6 +160,8 @@
 
 		}
 
+		Element.prototype.clearGL = function(gl, shaderProgram){};
+
 		Element.prototype.cleanupGL = function(gl){
 
 			var i;

--- a/src/js/circuit/PCB/ElementArc.js
+++ b/src/js/circuit/PCB/ElementArc.js
@@ -69,6 +69,8 @@
 	
 		}
 
+		ElementArc.prototype.clearGL = function(gl, shaderProgram){};
+
 		ElementArc.prototype.cleanupGL = function(gl){
 
 			if(this.pointBuffer){

--- a/src/js/circuit/PCB/ElementLine.js
+++ b/src/js/circuit/PCB/ElementLine.js
@@ -45,6 +45,8 @@
 
 	};
 
+	ElementLine.prototype.clearGL = function(gl, shaderProgram){};
+
 	ElementLine.prototype.cleanupGL = function(gl){
 
 		if(this.vertexBuffer){
@@ -63,7 +65,7 @@
 
 	};
 
-	ElementLine.prototype.setup3DArrayBuffer = function(gl, x, y){
+	ElementLine.prototype.generateLineBuffer = function(gl, thickness){
 
 		var vBuffer, ox1, oy1, ox2, oy2, x1, x2, x3, x4, y1, y2, y3, y4;
 
@@ -79,8 +81,8 @@
 		var run = ox2 - ox1;
 		var magnitude = Math.sqrt(rise * rise + run * run);
 
-		var xshift = rise / magnitude * (this.thick / 2);
-		var yshift = run / magnitude * (this.thick / 2);
+		var xshift = rise / magnitude * (thickness / 2);
+		var yshift = run / magnitude * (thickness / 2);
 
 		if(this.parent){
 			ox1 += this.parent.mx;
@@ -110,7 +112,27 @@
 		vBuffer.itemSize = 3;
 		vBuffer.numItems = 4;
 
-		this.vertexBuffer = vBuffer;
+		return vBuffer;
+
+	}
+
+	ElementLine.prototype.setup3DArrayBuffer = function(gl, x, y){
+
+		var vBuffer, ox1, oy1, ox2, oy2;
+
+		ox1 = this.x1;
+		oy1 = this.y1;
+		ox2 = this.x2;
+		oy2 = this.y2;
+
+		if(this.parent){
+			ox1 += this.parent.mx;
+			oy1 += this.parent.my;
+			ox2 += this.parent.mx;
+			oy2 += this.parent.my;
+		}
+
+		this.vertexBuffer = this.generateLineBuffer(gl, this.thick);
 
 		vBuffer = gl.createBuffer();
 		gl.bindBuffer(gl.ARRAY_BUFFER, vBuffer);

--- a/src/js/circuit/PCB/Layer.js
+++ b/src/js/circuit/PCB/Layer.js
@@ -1,113 +1,147 @@
-define(function(){
+define(
+	[
+	 	"./Polygon"
+	],
+	function(
+		Polygon
+	){
 
-	var Layer = function(pcbv, number, name, parts){
+		var Layer = function(pcbv, number, name, parts){
+	
+			this.pcbv = pcbv;
+	
+			this.number = number;
+			this.name = name;
+	
+			this.visible = true;
+	
+			if(parts) this.parts = parts;
+			else this.parts = [];
+	
+		};
+	
+		Layer.SOLDER = 0;
+		Layer.TOP = 1;
+	
+		Layer.prototype.addPart = function(part){
+	
+			this.parts.push(part);
+	
+		};
+	
+		Layer.prototype.render = function(ctx, color){
+	
+			if(!color) color = this.pcbv.getLayerColors()[this.number-1];
+	
+			for(var p = 0; p < this.parts.length; p++)
+				this.parts[p].render(ctx, color);
+	
+		};
+	
+		Layer.prototype.renderGL = function(gl, shaderProgram, oMatrix, mvMatrix, color, pins, elements){
+	
+			gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);
+	
+			gl.viewport(0, 0, this.framebuffer.width, this.framebuffer.height);
+			gl.clearColor(0.0, 0.0, 0.0, 0.0);
+			gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+	
+			// render clear polygons first
+			// render alpha of pins, same layer pads, and other clearing objects
+			// render non clear polygons
+			// render rest like normal
+	
+			gl.uniform4f(shaderProgram.vColorUniform, color.r, color.g, color.b, 1.0);
+	
+			var i;
 
-		this.pcbv = pcbv;
+			for(i = 0; i < this.parts.length; i++)
+				if(this.parts[i] instanceof Polygon)
+					this.parts[i].renderGL(gl, shaderProgram);
 
-		this.number = number;
-		this.name = name;
+			gl.uniform4f(shaderProgram.vColorUniform, 0.0, 0.0, 0.0, 0.0);
+			for(i = 0; i < this.parts.length; i++)
+				if(!(this.parts[i] instanceof Polygon))
+					this.parts[i].clearGL(gl, shaderProgram);
 
-		this.visible = true;
+			if(pins){
+				for(i = 0; i < pins.parts.length; i++)
+					pins.parts[i].clearGL(gl, shaderProgram);
+			}
+			if(elements){
+				for(i = 0; i < elements.parts.length; i++)
+					elements.parts[i].clearGL(gl, shaderProgram);
+			}
 
-		if(parts) this.parts = parts;
-		else this.parts = [];
+			gl.uniform4f(shaderProgram.vColorUniform, color.r, color.g, color.b, 1.0);
 
-	};
+			for(i = 0; i < this.parts.length; i++)
+				if(!(this.parts[i] instanceof Polygon))
+					this.parts[i].renderGL(gl, shaderProgram);
 
-	Layer.SOLDER = 0;
-	Layer.TOP = 1;
-
-	Layer.prototype.addPart = function(part){
-
-		this.parts.push(part);
-
-	};
-
-	Layer.prototype.render = function(ctx, color){
-
-		if(!color) color = this.pcbv.getLayerColors()[this.number-1];
-
-		for(var p = 0; p < this.parts.length; p++)
-			this.parts[p].render(ctx, color);
-
-	};
-
-	Layer.prototype.renderGL = function(gl, shaderProgram, oMatrix, mvMatrix, color){
-
-		gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);
-
-		gl.viewport(0, 0, this.framebuffer.width, this.framebuffer.height);
-		gl.clearColor(0.0, 0.0, 0.0, 0.0);
-		gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-
-		gl.uniform4f(shaderProgram.vColorUniform, color.r, color.g, color.b, 1.0);
-
-		var i;
-		for(i = 0; i < this.parts.length; i++)
-			this.parts[i].renderGL(gl, shaderProgram);
+		}
+	
+		Layer.prototype.cleanupGL = function(gl){
+	
+			var i;
+			for(i = 0; i < this.parts.length; i++)
+				this.parts[i].cleanupGL(gl);
+	
+			gl.deleteTexture(this.texture);
+			gl.deleteRenderbuffer(this.renderbuffer);
+			gl.deleteFramebuffer(this.framebuffer);
+	
+		}
+	
+		Layer.prototype.init3DArrays = function(gl){
+	
+			var i;
+			for(i = 0; i < this.parts.length; i++)
+				this.parts[i].setup3DArrayBuffer(gl, 0, 0);
+	
+		}
+	
+		Layer.prototype.resizeFrameBuffer = function(gl){
+	
+	        this.framebuffer.width = gl.viewportWidth;
+	        this.framebuffer.height = gl.viewportHeight;
+	
+	        gl.bindTexture(gl.TEXTURE_2D, this.texture);
+	        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this.framebuffer.width, this.framebuffer.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+	        gl.bindRenderbuffer(gl.RENDERBUFFER, this.renderbuffer);
+	        gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, this.framebuffer.width, this.framebuffer.height);
+	
+		}
+	
+		Layer.prototype.setupFramebuffer = function(gl){
+	
+	        this.framebuffer = gl.createFramebuffer();
+	        gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);
+	        this.framebuffer.width = gl.viewportWidth;
+	        this.framebuffer.height = gl.viewportHeight;
+	
+	        this.texture = gl.createTexture();
+	        gl.bindTexture(gl.TEXTURE_2D, this.texture);
+	        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+	        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+	        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+	
+	        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this.framebuffer.width, this.framebuffer.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+	
+	        this.renderbuffer = gl.createRenderbuffer();
+	        gl.bindRenderbuffer(gl.RENDERBUFFER, this.renderbuffer);
+	        gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, this.framebuffer.width, this.framebuffer.height);
+	
+	        gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+	        gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, this.renderbuffer);
+	
+	        gl.bindTexture(gl.TEXTURE_2D, null);
+	        gl.bindRenderbuffer(gl.RENDERBUFFER, null);
+	        gl.bindFramebuffer(gl.FRAMEBUFFER, null);
+	
+		}
+	
+		return Layer;
 
 	}
-
-	Layer.prototype.cleanupGL = function(gl){
-
-		var i;
-		for(i = 0; i < this.parts.length; i++)
-			this.parts[i].cleanupGL(gl);
-
-		gl.deleteTexture(this.texture);
-		gl.deleteRenderbuffer(this.renderbuffer);
-		gl.deleteFramebuffer(this.framebuffer);
-
-	}
-
-	Layer.prototype.init3DArrays = function(gl){
-
-		var i;
-		for(i = 0; i < this.parts.length; i++)
-			this.parts[i].setup3DArrayBuffer(gl, 0, 0);
-
-	}
-
-	Layer.prototype.resizeFrameBuffer = function(gl){
-
-        this.framebuffer.width = gl.viewportWidth;
-        this.framebuffer.height = gl.viewportHeight;
-
-        gl.bindTexture(gl.TEXTURE_2D, this.texture);
-        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this.framebuffer.width, this.framebuffer.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
-        gl.bindRenderbuffer(gl.RENDERBUFFER, this.renderbuffer);
-        gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, this.framebuffer.width, this.framebuffer.height);
-
-	}
-
-	Layer.prototype.setupFramebuffer = function(gl){
-
-        this.framebuffer = gl.createFramebuffer();
-        gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);
-        this.framebuffer.width = gl.viewportWidth;
-        this.framebuffer.height = gl.viewportHeight;
-
-        this.texture = gl.createTexture();
-        gl.bindTexture(gl.TEXTURE_2D, this.texture);
-        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
-        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
-        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
-
-        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this.framebuffer.width, this.framebuffer.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
-
-        this.renderbuffer = gl.createRenderbuffer();
-        gl.bindRenderbuffer(gl.RENDERBUFFER, this.renderbuffer);
-        gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, this.framebuffer.width, this.framebuffer.height);
-
-        gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
-        gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, this.renderbuffer);
-
-        gl.bindTexture(gl.TEXTURE_2D, null);
-        gl.bindRenderbuffer(gl.RENDERBUFFER, null);
-        gl.bindFramebuffer(gl.FRAMEBUFFER, null);
-
-	}
-
-	return Layer;
-
-});
+);

--- a/src/js/circuit/PCB/LayerManager.js
+++ b/src/js/circuit/PCB/LayerManager.js
@@ -124,23 +124,23 @@
 
 			if(side == Layer.TOP){
 
-				this.topSilk.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 0.0, g: 0.0, b: 0.0});
-				this.bottomSilk.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 1.0, g: 1.0, b: 1.0});
-
-				this.top.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 1.0, g: 1.0, b: 1.0});
-				this.solder.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 0.0, g: 0.0, b: 0.0});
+				this.topSilk.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 0.0, g: 0.0, b: 0.0}, this.pins, null);
+				this.bottomSilk.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 1.0, g: 1.0, b: 1.0}, this.pins, null);
+
+				this.top.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 1.0, g: 1.0, b: 1.0}, this.pins, null);
+				this.solder.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 0.0, g: 0.0, b: 0.0}, this.pins, null);
 
 			} else {
 
-				this.topSilk.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 1.0, g: 1.0, b: 1.0});
-				this.bottomSilk.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 0.0, g: 0.0, b: 0.0});
-
-				this.top.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 0.0, g: 0.0, b: 0.0});
-				this.solder.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 1.0, g: 1.0, b: 1.0});
-
-			}
-
-			this.pins.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 1.0, g: 1.0, b: 1.0});
+				this.topSilk.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 1.0, g: 1.0, b: 1.0}, this.pins, null);
+				this.bottomSilk.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 0.0, g: 0.0, b: 0.0}, this.pins, null);
+
+				this.top.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 0.0, g: 0.0, b: 0.0}, this.pins, null);
+				this.solder.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 1.0, g: 1.0, b: 1.0}, this.pins, null);
+
+			}
+
+			this.pins.renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: 1.0, g: 1.0, b: 1.0}, null);
 
 			for(l = 0; l < this.otherLayers.length; l++){
 
@@ -150,7 +150,12 @@
 				g = parseInt(color.substring(3, 5), 16) / 256;
 				b = parseInt(color.substring(5, 7), 16) / 256;
 
-				this.otherLayers[l].renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: r, g: g, b: b});
+				if(this.otherLayers[l].name == "bottom")
+					this.otherLayers[l].renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: r, g: g, b: b}, this.pins, this.solder);
+				else if(this.otherLayers[l].name == "top")
+					this.otherLayers[l].renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: r, g: g, b: b}, this.pins, this.top);
+				else
+					this.otherLayers[l].renderGL(gl, shaderProgram, oMatrix, mvMatrix, {r: r, g: g, b: b}, this.pins, null);
 
 			}
 

--- a/src/js/circuit/PCB/Line.js
+++ b/src/js/circuit/PCB/Line.js
@@ -8,14 +8,77 @@
 		Class
 	){
 
-		var Line = function(x1, y1, x2, y2, thick, notsure, notsure2){
+		var Line = function(x1, y1, x2, y2, thick, clearance, flags){
 	
 			ElementLine.call(this, x1, y1, x2, y2, thick);
-			
+
+			this.clearance = clearance;
+			this.flags = 
+			{
+				clearline: false
+			};
+
+			if(flags){
+				var split = flags.split(','), i;
+
+				for(i = 0; i < split.length; i++){
+					this.flags[split[i]] = true;
+				}
+			}
+
 		};
 	
 		Class.extend(ElementLine, Line);
+
+		Line.prototype.clearGL = function(gl, shaderProgram){
+
+			if(this.flags.clearline){
+
+				gl.bindBuffer(gl.ARRAY_BUFFER, this.clearBuffer);
+				gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, this.clearBuffer.itemSize, gl.FLOAT, false, 0, 0);
+				gl.drawArrays(gl.TRIANGLE_STRIP, 0, this.clearBuffer.numItems);
 	
+				gl.uniform1f(shaderProgram.innerRadiusUniform, 0.0);
+	
+				gl.uniform1f(shaderProgram.pointsizeUniform, (this.thick + this.clearance) * gl.scaleFactor);
+				gl.uniform1f(shaderProgram.roundPointsUniform, true);
+				gl.bindBuffer(gl.ARRAY_BUFFER, this.pointBuffer);
+				gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, this.pointBuffer.itemSize, gl.FLOAT, false, 0, 0);
+				gl.drawArrays(gl.POINTS, 0, this.pointBuffer.numItems);
+				gl.uniform1f(shaderProgram.roundPointsUniform, false);
+
+			}
+
+		};
+
+		Line.prototype.setup3DArrayBuffer = function(gl, x, y){
+
+			var vBuffer, ox1, oy1, ox2, oy2;
+
+			ox1 = this.x1;
+			oy1 = this.y1;
+			ox2 = this.x2;
+			oy2 = this.y2;
+
+			if(this.parent){
+				ox1 += this.parent.mx;
+				oy1 += this.parent.my;
+				ox2 += this.parent.mx;
+				oy2 += this.parent.my;
+			}
+
+			this.vertexBuffer = this.generateLineBuffer(gl, this.thick);
+			this.clearBuffer = this.generateLineBuffer(gl, (this.thick + this.clearance));
+
+			vBuffer = gl.createBuffer();
+			gl.bindBuffer(gl.ARRAY_BUFFER, vBuffer);
+			gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ox1,oy1,0.0,ox2,oy2,0.0]), gl.STATIC_DRAW);
+			vBuffer.itemSize = 3;
+			vBuffer.numItems = 2;
+			this.pointBuffer = vBuffer;
+
+		};
+		
 		return Line;
 
 	}

--- a/src/js/circuit/PCB/PCBViewer.js
+++ b/src/js/circuit/PCB/PCBViewer.js
@@ -18,6 +18,7 @@
 	 	"./Element",
 	 	"./ElementLine",
 	 	"./ElementArc",
+	 	"./Polygon",
 	 	"./Symbol",
 	 	"./LayerManager",
 	 	"Graphics/glMatrix",
@@ -37,6 +38,7 @@
 		Element,
 		ElementLine,
 		ElementArc,
+		Polygon,
 		Symbol,
 		LayerManager,
 		glMatrix,
@@ -387,8 +389,38 @@
 	
 							new_obj.parts.push(sub_obj);
 	
-						};
-	
+						} else if(line.substr(0, 7) == "Polygon"){
+
+							var flags = line.substr(9,line.length-11), points = [];
+
+							line = '';
+							while(line.indexOf(')') == -1){
+
+								l++;
+								line = lines[l];
+
+								var bracket_idx = line.indexOf('[');
+								while(bracket_idx != -1){
+
+									var space_idx = line.indexOf(' ', bracket_idx);
+
+									var newPoint = {
+										x: parseFloat(line.substring(bracket_idx + 1, space_idx)),
+										y: parseFloat(line.substring(space_idx + 1, line.indexOf(']', space_idx))),
+									};
+									points.push(newPoint);
+									bracket_idx++;
+									bracket_idx = line.indexOf('[', bracket_idx);
+
+								}
+
+							}
+
+							sub_obj = new Polygon(flags, points);
+							new_obj.parts.push(sub_obj);
+
+						}
+
 					}
 	
 					this.layers.push(new_obj);
@@ -432,11 +464,7 @@
 	
 					this.symbols[new_obj.name] = new_obj;
 	
-				} else if(line.substr(0, 7) == "Polygon"){
-	
-					//
-	
-				}
+				} else {}
 	
 				l++;
 	

--- a/src/js/circuit/PCB/Pad.js
+++ b/src/js/circuit/PCB/Pad.js
@@ -40,6 +40,14 @@
 
 	}
 
+	Pad.prototype.clearGL = function(gl, shaderProgram){
+
+		gl.bindBuffer(gl.ARRAY_BUFFER, this.clearBuffer);
+		gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, this.clearBuffer.itemSize, gl.FLOAT, false, 0, 0);
+		gl.drawArrays(gl.TRIANGLE_STRIP, 0, this.clearBuffer.numItems);
+
+	};
+
 	Pad.prototype.cleanupGL = function(gl){
 
 		if(this.vertexBuffer){
@@ -51,17 +59,17 @@
 
 	}
 
-	Pad.prototype.setup3DArrayBuffer = function(gl, x, y){
+	Pad.prototype.generatePadBuffer = function(gl, thick){
 
-		var vBuffer, x1, x2, y1, y2;
+		var vBuffer, vertices, x1, x2, y1, y2;
 
 		vBuffer = gl.createBuffer();
 		gl.bindBuffer(gl.ARRAY_BUFFER, vBuffer);
 
-		x1 = this.parent.mx + this.x1 - (this.thick / 2);
-		y1 = this.parent.my + this.y1 - (this.thick / 2);
-		x2 = x1 + this.x2 - this.x1 + this.thick;
-		y2 = y1 + this.y2 - this.y1 + this.thick;
+		x1 = this.parent.mx + this.x1 - (thick / 2);
+		y1 = this.parent.my + this.y1 - (thick / 2);
+		x2 = x1 + this.x2 - this.x1 + thick;
+		y2 = y1 + this.y2 - this.y1 + thick;
 
 		vertices = [
 		 x2, y2,  0.0,
@@ -75,7 +83,14 @@
 		vBuffer.itemSize = 3;
 		vBuffer.numItems = 4;
 
-		this.vertexBuffer = vBuffer;
+		return vBuffer;
+
+	}
+
+	Pad.prototype.setup3DArrayBuffer = function(gl, x, y){
+
+		this.vertexBuffer = this.generatePadBuffer(gl, this.thick);
+		this.clearBuffer = this.generatePadBuffer(gl, this.thick + this.clear);
 
 	};
 

--- a/src/js/circuit/PCB/Pin.js
+++ b/src/js/circuit/PCB/Pin.js
@@ -74,6 +74,28 @@
 
 	}
 
+	Pin.prototype.clearGL = function(gl, shaderProgram){
+
+		var splt = this.flags.split(','), square = true;
+
+		for (i = 0; i < splt.length; i++)
+			if (splt[i] == 'square')
+				square = false;
+
+		
+		gl.uniform1f(shaderProgram.roundPointsUniform, square);
+
+		gl.bindBuffer(gl.ARRAY_BUFFER, this.pointBuffer);
+		gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, this.pointBuffer.itemSize, gl.FLOAT, false, 0, 0);
+
+		gl.uniform1f(shaderProgram.innerRadiusUniform, 0.0);
+		gl.uniform1f(shaderProgram.pointsizeUniform, (this.thick + this.clear) * gl.scaleFactor);
+		gl.drawArrays(gl.POINTS, 0, this.pointBuffer.numItems);
+
+		gl.uniform1f(shaderProgram.roundPointsUniform, false);
+
+	};
+
 	Pin.prototype.cleanupGL = function(gl){
 
 		if(this.pointBuffer){

--- /dev/null
+++ b/src/js/circuit/PCB/Polygon.js
@@ -1,1 +1,145 @@
+define(
+	[],
+	function(){
 
+		var Polygon = function(flags, points){
+
+			this.flags = {};
+			this.points = points;
+
+			var split, i;
+
+			split = flags.split(',');
+			for(i = 0; i < split.length; i++){
+
+				//
+
+			}
+
+			// Decompose into triangles
+			// turn into doubly linked list
+			var previous, head, next;
+			head = previous = {
+					previous: null,
+					next: null,
+					self: this.points[0]
+				}
+			for(i = 1; i < this.points.length; i++){
+				next = {
+					previous: previous,
+					next: null,
+					self: this.points[i]
+				}
+				previous.next = next;
+				previous = next;
+			}
+			previous.next = head;
+			head.previous = previous;
+
+			// look at sets of 3 nodes
+			var pointCount = this.points.length, currentNode = head, triangles = [];
+			while(pointCount > 3){
+
+				previous = currentNode.previous;
+				next = currentNode.next;
+
+				// if they are convex cut out current node and make a triangle
+				var dx1, dy1, dx2, dy2;
+
+				dx1 = currentNode.self.x - previous.self.x;
+				dy1 = currentNode.self.y - previous.self.y;
+				dx2 = next.self.x - currentNode.self.x;
+				dy2 = next.self.y - currentNode.self.y;
+
+				var ang = Math.atan2(dy2, dx2) - Math.atan2(dy1, dx1);
+
+				if(ang < 0){
+
+					triangles.push(
+						[
+						 	[previous.self.x, previous.self.y],
+						 	[currentNode.self.x, currentNode.self.y],
+						 	[next.self.x, next.self.y]
+						]
+					);
+
+					next.previous = previous;
+					previous.next = next;
+					currentNode = next;
+
+					pointCount--;
+
+				} else {
+					currentNode = currentNode.next;
+				}
+
+			}
+
+			triangles.push(
+					[
+					 	[currentNode.previous.self.x, currentNode.previous.self.y],
+					 	[currentNode.self.x, currentNode.self.y],
+					 	[currentNode.next.self.x, currentNode.next.self.y]
+					]
+				);
+
+			this.triangles = triangles;
+
+		};
+
+		Polygon.prototype.render = function(ctx, color){
+
+			ctx.beginPath();
+			ctx.moveTo(this.points[0].x, this.points[0].y);
+			for(var i = 1; i < this.points.length; i++)
+				ctx.lineTo(this.points[i].x, this.points[i].y);
+			ctx.closePath();
+			ctx.fillStyle = color;
+			ctx.fill();
+
+		};
+
+		Polygon.prototype.renderGL = function(gl, shaderProgram){
+
+			gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);
+			gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, this.vertexBuffer.itemSize, gl.FLOAT, false, 0, 0);
+			gl.drawArrays(gl.TRIANGLES, 0, this.vertexBuffer.numItems);
+
+		};
+
+		Polygon.prototype.cleanupGL = function(gl){
+
+			//
+
+		};
+
+		Polygon.prototype.setup3DArrayBuffer = function(gl, x, y){
+
+			var vBuffer, vertices = [], i;
+
+			var vBuffer = gl.createBuffer();
+			gl.bindBuffer(gl.ARRAY_BUFFER, vBuffer);
+
+			for(i = 0; i < this.triangles.length; i++){
+				vertices.push(this.triangles[i][0][0]);
+				vertices.push(this.triangles[i][0][1]);
+				vertices.push(0.0);
+				vertices.push(this.triangles[i][1][0]);
+				vertices.push(this.triangles[i][1][1]);
+				vertices.push(0.0);
+				vertices.push(this.triangles[i][2][0]);
+				vertices.push(this.triangles[i][2][1]);
+				vertices.push(0.0);
+			}
+
+			gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);
+			vBuffer.itemSize = 3;
+			vBuffer.numItems = this.triangles.length * 3;
+			this.vertexBuffer = vBuffer;
+
+		};
+
+		return Polygon;
+
+	}
+);

--- a/src/js/circuit/PCB/Text.js
+++ b/src/js/circuit/PCB/Text.js
@@ -81,6 +81,8 @@
 	        gl.uniformMatrix4fv(shaderProgram.mvMatrixUniform, false, mvMatrix);
 
 		}
+
+		Text.prototype.clearGL = function(gl, shaderProgram){};
 	
 		Text.prototype.cleanupGL = function(gl){}
 

--- a/src/js/circuit/PCB/Via.js
+++ b/src/js/circuit/PCB/Via.js
@@ -1,10 +1,11 @@
 define(function() {
-	var Via = function(x, y, od, u1, u2, id, u3, u4) {
+	var Via = function(x, y, od, clearance, u2, id, u3, u4) {
 
 		this.x = x;
 		this.y = y;
 		this.od = od;
 		this.id = id;
+		this.clearance = clearance;
 
 	};
 
@@ -45,6 +46,23 @@
 
 	}
 
+	Via.prototype.clearGL = function(gl, shaderProgram){
+
+		gl.uniform1f(shaderProgram.roundPointsUniform, true);
+
+		gl.bindBuffer(gl.ARRAY_BUFFER, this.pointBuffer);
+		gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, this.pointBuffer.itemSize, gl.FLOAT, false, 0, 0);
+
+		gl.uniform1f(shaderProgram.innerRadiusUniform, 0.0);
+
+		gl.uniform1f(shaderProgram.pointsizeUniform, (this.od + this.clearance) * gl.scaleFactor);
+		gl.drawArrays(gl.POINTS, 0, this.pointBuffer.numItems);
+
+
+		gl.uniform1f(shaderProgram.roundPointsUniform, false);
+
+	};
+
 	Via.prototype.cleanupGL = function(gl){
 
 		if(this.pointBuffer){