Commits

iorodeo committed 03c5110

Project creation.

Comments (0)

Files changed (114)

led_array_3mm/LED-3MM-MOD.bak

+PCBNEW-LibModule-V1  Sun 10 Feb 2013 08:22:24 PM PST
+# encoding utf-8
+$INDEX
+LED-3MM-MOD
+$EndINDEX
+$MODULE LED-3MM-MOD
+Po 0 0 0 15 5118713F 00000000 ~~
+Li LED-3MM-MOD
+Cd LED 3mm - Lead pitch 100mil (2,54mm)
+Kw LED led 3mm 3MM 100mil 2,54mm
+Sc 00000000
+AR LED-3MM
+Op 0 0 0
+At VIRTUAL 
+T0 2 4 300 300 0 35 N V 21 N "LED-3MM-MOD"
+T1 286 482 300 300 0 35 N I 21 N "VAL***"
+DS 720 500 720 -500 100 21
+DA 100 0 100 -800 501 100 21
+DA 100 0 -605 -376 619 100 21
+DA 100 0 710 516 497 100 21
+DA 100 0 100 800 602 100 21
+DA 100 0 -700 0 283 100 21
+DA 100 0 -581 419 316 100 21
+$PAD
+Sh "1" C 550 550 0 0 0
+Dr 320 0 0
+At STD N 00A8FFFF
+Ne 0 ""
+Po -500 0
+$EndPAD
+$PAD
+Sh "2" C 550 550 0 0 0
+Dr 320 0 0
+At STD N 00A8FFFF
+Ne 0 ""
+Po 500 0
+$EndPAD
+$SHAPE3D
+Na "discret/leds/led3_vertical_verde.wrl"
+Sc 1.000000 1.000000 1.000000
+Of 0.000000 0.000000 0.000000
+Ro 0.000000 0.000000 0.000000
+$EndSHAPE3D
+$EndMODULE  LED-3MM-MOD
+$EndLIBRARY

led_array_3mm/LED-3MM-MOD.mod

+PCBNEW-LibModule-V1  Sun 10 Feb 2013 08:48:16 PM PST
+# encoding utf-8
+$INDEX
+LED-3MM-MOD
+$EndINDEX
+$MODULE LED-3MM-MOD
+Po 0 0 0 15 51187805 00000000 ~~
+Li LED-3MM-MOD
+Cd LED 3mm - Lead pitch 100mil (2,54mm)
+Kw LED led 3mm 3MM 100mil 2,54mm
+Sc 00000000
+AR LED-3MM
+Op 0 0 0
+At VIRTUAL 
+T0 2 4 300 300 0 35 N V 21 N "LED-3MM-MOD"
+T1 286 482 300 300 0 35 N I 21 N "VAL***"
+DA 0 0 472 630 900 79 21
+DS 472 -630 472 630 79 21
+DA 0 0 -630 -472 900 79 21
+DA 0 0 0 787 900 79 21
+DA 0 0 -787 0 900 79 21
+$PAD
+Sh "1" C 550 550 0 0 0
+Dr 320 0 0
+At STD N 00A8FFFF
+Ne 0 ""
+Po -500 0
+$EndPAD
+$PAD
+Sh "2" C 550 550 0 0 0
+Dr 320 0 0
+At STD N 00A8FFFF
+Ne 0 ""
+Po 500 0
+$EndPAD
+$SHAPE3D
+Na "discret/leds/led3_vertical_verde.wrl"
+Sc 1.000000 1.000000 1.000000
+Of 0.000000 0.000000 0.000000
+Ro 0.000000 0.000000 0.000000
+$EndSHAPE3D
+$EndMODULE  LED-3MM-MOD
+$EndLIBRARY

led_array_3mm/LED-3MM-MOD.mod~

+PCBNEW-LibModule-V1  Sun 10 Feb 2013 08:22:24 PM PST
+# encoding utf-8
+$INDEX
+LED-3MM-MOD
+$EndINDEX
+$MODULE LED-3MM-MOD
+Po 0 0 0 15 5118713F 00000000 ~~
+Li LED-3MM-MOD
+Cd LED 3mm - Lead pitch 100mil (2,54mm)
+Kw LED led 3mm 3MM 100mil 2,54mm
+Sc 00000000
+AR LED-3MM
+Op 0 0 0
+At VIRTUAL 
+T0 2 4 300 300 0 35 N V 21 N "LED-3MM-MOD"
+T1 286 482 300 300 0 35 N I 21 N "VAL***"
+DS 720 500 720 -500 100 21
+DA 100 0 100 -800 501 100 21
+DA 100 0 -605 -376 619 100 21
+DA 100 0 710 516 497 100 21
+DA 100 0 100 800 602 100 21
+DA 100 0 -700 0 283 100 21
+DA 100 0 -581 419 316 100 21
+$PAD
+Sh "1" C 550 550 0 0 0
+Dr 320 0 0
+At STD N 00A8FFFF
+Ne 0 ""
+Po -500 0
+$EndPAD
+$PAD
+Sh "2" C 550 550 0 0 0
+Dr 320 0 0
+At STD N 00A8FFFF
+Ne 0 ""
+Po 500 0
+$EndPAD
+$SHAPE3D
+Na "discret/leds/led3_vertical_verde.wrl"
+Sc 1.000000 1.000000 1.000000
+Of 0.000000 0.000000 0.000000
+Ro 0.000000 0.000000 0.000000
+$EndSHAPE3D
+$EndMODULE  LED-3MM-MOD
+$EndLIBRARY

led_array_3mm/PANEL_HEADER_8PIN.mod

+PCBNEW-LibModule-V1  Sun 10 Feb 2013 07:20:53 PM PST
+# encoding utf-8
+$INDEX
+PANEL_HEADER_8PIN
+$EndINDEX
+$MODULE PANEL_HEADER_8PIN
+Po 0 0 0 15 51186358 00000000 ~~
+Li PANEL_HEADER_8PIN
+Sc 00000000
+AR 
+Op 0 0 0
+T0 0 1250 600 600 0 120 N V 21 N "PANEL_HEADER_8PIN"
+T1 0 -1150 600 600 0 120 N V 21 N "VAL**"
+DS -3850 -50 -3850 -250 150 21
+DS -3850 -250 3750 -250 150 21
+DS 3750 -250 3800 -250 150 21
+DS 3800 -250 3800 250 150 21
+DS 3800 250 -3850 250 150 21
+DS -3850 250 -3850 0 150 21
+DS -3850 0 -3850 -150 150 21
+$PAD
+Sh "4" C 400 400 0 0 0
+Dr 250 0 0
+At STD N 00E0FFFF
+Ne 0 ""
+Po -500 0
+$EndPAD
+$PAD
+Sh "3" C 400 400 0 0 0
+Dr 250 0 0
+At STD N 00E0FFFF
+Ne 0 ""
+Po -1500 0
+$EndPAD
+$PAD
+Sh "2" C 400 400 0 0 0
+Dr 250 0 0
+At STD N 00E0FFFF
+Ne 0 ""
+Po -2500 0
+$EndPAD
+$PAD
+Sh "1" R 400 400 0 0 0
+Dr 250 0 0
+At STD N 00E0FFFF
+Ne 0 ""
+Po -3500 0
+$EndPAD
+$PAD
+Sh "5" C 400 400 0 0 0
+Dr 250 0 0
+At STD N 00E0FFFF
+Ne 0 ""
+Po 500 0
+$EndPAD
+$PAD
+Sh "6" C 400 400 0 0 0
+Dr 250 0 0
+At STD N 00E0FFFF
+Ne 0 ""
+Po 1500 0
+$EndPAD
+$PAD
+Sh "7" C 400 400 0 0 0
+Dr 250 0 0
+At STD N 00E0FFFF
+Ne 0 ""
+Po 2500 0
+$EndPAD
+$PAD
+Sh "8" C 400 400 0 0 0
+Dr 250 0 0
+At STD N 00E0FFFF
+Ne 0 ""
+Po 3500 0
+$EndPAD
+$EndMODULE  PANEL_HEADER_8PIN
+$EndLIBRARY

led_array_3mm/brd_tools.py

+"""
+Copyright 2010  IO Rodeo Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+from __future__ import print_function
+from __future__ import division
+import sys
+import numpy
+
+class ComponentPlacer(object):
+
+    def __init__(self,filename):
+        """
+        Read the file and get list of file lines and dictionary of modules.
+        """
+        self.filename = filename
+        self.lines = self.readFile()
+        self.moduleDict = self.getModuleDict()
+
+    def readFile(self):
+        """
+        Read the file and return a list of all lines.
+        """
+        with open(self.filename,'r') as fid:
+            lines = fid.readlines()
+        return lines
+
+    def getModuleDict(self):
+        """
+        Get a dictionary of all modules.
+        """
+        inModule = False
+        moduleDict = {}
+        # Loop over all lines in file
+        for i, line in enumerate(self.lines):
+            splitLine = line.split()
+            if splitLine:
+                if inModule:
+                    # We are in a module get lines, module reference and determine when
+                    # module ends.
+                    moduleLines.append((i,line))
+                    if splitLine[0] == '$EndMODULE':
+                        inModule = False
+                        if moduleRef is not None:
+                            moduleDict[moduleRef] = moduleLines
+                        else:
+                            raise ValueError, 'module has no reference'
+                    else:
+                        if splitLine[0] == 'T0':
+                            moduleRef =  splitLine[-1][1:-1]
+                else:
+                    # We are not in module .. look for module start.
+                    if splitLine[0] == '$MODULE':
+                        inModule = True
+                        moduleLines = [(i,line)]
+                        moduleRef = None
+        return moduleDict
+
+    def setModulePos(self,name,x,y,ang):
+        """
+        Set position of current modules. The values for x and y should be given in inches and
+        ang in degrees.
+
+        Note, this function should really read the module template form the .mod library file.
+        """
+        moduleLines = self.moduleDict[name]
+
+        # Set position of the module itself
+        # 
+        # Note, it might make sense to make rotations relative ... or to read 
+        # The template from the .mod file. 
+        # 
+        posFound = False
+        for moduleIndex, lineData in enumerate(moduleLines):
+            linesIndex, line = lineData
+            splitLine = line.split()
+            if splitLine[0] == 'Po' and len(splitLine) > 3:
+
+                # Get new positions and angle
+                curX = int(splitLine[1])
+                newX = round(curX + 10000*x)
+                curY = int(splitLine[2])
+                newY = round(curY + 10000*y)
+                curAng = int(splitLine[3])
+                newAng = (curAng + round(ang))%3600
+
+                # write new position and angle
+                splitLine[1] = '%d'%(round(newX),)
+                splitLine[2] = '%d'%(round(newY),)
+                splitLine[3] = '%d'%(round(newAng),)
+                for k, val in enumerate(splitLine):
+                    if k == 0:
+                        newLine = '%s'%(val,)
+                    else:
+                        newLine = '%s %s'%(newLine, val)
+                newLine = '%s\n'%(newLine,)
+                self.lines[linesIndex] = newLine
+                moduleLines[moduleIndex] = (linesIndex,newLine)
+                posFound = True
+                break
+        # Check to see if modules was found - this is a kludge
+        if not posFound:
+            raise ValueError, 'module, %s,  position not found'%(name,)
+
+        # Set position of pads in module
+        for moduleIndex, lineData in enumerate(moduleLines):
+            linesIndex, line = lineData
+            splitLine = line.split()
+            if splitLine[0] == 'Sh':
+                curAng = int(splitLine[-1])
+                newAng = (curAng + round(ang))%3600
+                splitLine[-1] = '%d'%(newAng,)
+                for k, val in enumerate(splitLine):
+                    if k == 0:
+                        newLine = '%s'%(val,)
+                    else:
+                        newLine = '%s %s'%(newLine, val)
+                newLine = '%s\n'%(newLine,)
+                self.lines[linesIndex] = newLine
+                moduleLines[moduleIndex] = (linesIndex,newLine)
+
+    def write(self,filename=None):
+        """
+        Write new .brd file. If filename argument is not specified the
+        same name as the original file will be used.
+        """
+        if filename is None:
+            filename = self.filename
+        with open(filename,'w') as fid:
+            for line in self.lines:
+                fid.write(line)
+
+    def printLines(self):
+        """
+        Prints all lines in the file.
+        """
+        for i, line in enumerate(self.lines):
+            print(i, line)
+
+
+class SegmentDrawer(object):
+
+    def __init__(self,filename):
+        """
+        Read the file and get list of file lines and dictionary of modules.
+        """
+        self.filename = filename
+        self.lines = self.readFile()
+        self.getNumDrawings()
+        self.getInsertPos()
+
+    def readFile(self):
+        """
+        Read the file and return a list of all lines.
+        """
+        with open(self.filename,'r') as fid:
+            lines = fid.readlines()
+        return lines 
+
+    def getNumDrawings(self):
+        """
+        Gets the number of drawings currently in .brd file and line number of
+        the Ndraw line. 
+        """
+        found = False
+        for i, line in enumerate(self.lines):
+            lineSplit = line.split()
+            if not lineSplit:
+                continue
+            if lineSplit[0] == 'Ndraw':
+                self.numDrawings = int(lineSplit[1])
+                self.numDrawingsLine = i
+                found = True
+                break
+        if not found:
+            raise ValueEror, 'number of drawings Ndraw not found in file %s'%(self.filename,)
+
+    def getInsertPos(self):
+        """
+        Get line number at which to start segemnet insertion.
+        """
+        for i, line in enumerate(self.lines):
+            lineSplit = line.split()
+            if not lineSplit:
+                continue
+            if lineSplit[0] in ('$EndSETUP', '$EndMODULE'):
+                self.insertPos = i+1
+
+    def insertLine(self, lineStr):
+        """
+        Insert a line into the brd file
+        """
+        self.lines.insert(self.insertPos,lineStr + '\n')
+        self.insertPos += 1
+
+    def setLine(self, lineNum, lineStr):
+        """
+        Set the line number lineNum in the file to lineStr
+        """
+        self.lines[lineNum] = lineStr + '\n'
+
+    def incrNumDrawings(self):
+        """
+        Increment number of drawings.
+        """
+        self.numDrawings += 1
+        self.setLine(self.numDrawingsLine,'Ndraw %d'%(self.numDrawings,))
+
+    def addLineSegment(self,x0,y0,x1,y1,width, layer='edges_pcb'):
+        """
+        Add a line segment to the brd file.
+        """
+        _layer = layer.lower()
+        if _layer == 'edges_pcb':
+            layerNum = 28
+        elif _layer == 'drawing':
+            layerNum = 24
+        elif _layer == 'comments':
+            layerNum = 25
+        else:
+            raise ValueError, 'unknown layer: %s'%(layer,)
+
+        # Scale values to 1/10000 of and inch
+        _x0 = 10000*x0
+        _y0 = 10000*y0
+        _x1 = 10000*x1
+        _y1 = 10000*y1
+        _width = 10000*width
+        
+        # Add line segment
+        self.insertLine('$DRAWSEGMENT')
+        self.insertLine('Po 0 %d %d %d %d %d'%(_x0, _y0, _x1, _y1, _width))
+        self.insertLine('De %d 0 900 0 0'%(layerNum,))
+        self.insertLine('$EndDRAWSEGMENT')
+
+        # Update number of drawings
+        self.incrNumDrawings()
+
+    def addRectangle(self, upperRight, lowerLeft, width, layer='edges_pcb'):
+        """
+        Add rectange to brd file by specifying the upperRight and lowerLeft 
+        corners of the board.
+        """
+        x0, y0 = upperRight
+        x1, y1 = lowerLeft
+        self.addLineSegment(x0,y0,x0,y1,width,layer=layer)
+        self.addLineSegment(x0,y1,x1,y1,width,layer=layer)
+        self.addLineSegment(x1,y1,x1,y0,width,layer=layer)
+        self.addLineSegment(x1,y0,x0,y0,width,layer=layer)
+
+    def addCircularNgon(self,n,center,radius,width,rotAng=0,layer='edges_pcb'):
+        """
+        Add circular n-gon where n is the number of sides
+        """
+        cx, cy = center
+        t = numpy.arange(0,n)/float(n)
+        rotAngRad = rotAng*numpy.pi/180.0
+
+        xPoints = cx + radius*numpy.cos(2*numpy.pi*t + rotAngRad)
+        yPoints = cy + radius*numpy.sin(2*numpy.pi*t + rotAngRad)
+
+        for i in range(0,n):
+            j = (i+1)%n
+            x0 = xPoints[i]
+            y0 = yPoints[i]
+            x1 = xPoints[j]
+            y1 = yPoints[j]
+            self.addLineSegment(x0,y0,x1,y1,width,layer=layer)
+        
+    def write(self,filename=None):
+        """
+        Write new .brd file. If filename argument is not specified the
+        same name as the original file will be used.
+        """
+
+        # Update the number of drawings
+
+        if filename is None:
+            filename = self.filename
+        with open(filename,'w') as fid:
+            for line in self.lines:
+                fid.write(line)
+
+# -----------------------------------------------------------------------------
+if __name__ == '__main__':
+    import math
+
+    xNum = 8 
+    yNum = 8
+
+    xOffset = -3.2674
+    yOffset = -3.7674
+
+    xStart = xOffset + 2.0 + 0.5*32.0/25.4 - (2 + 3*4)/25.4
+    yStart = yOffset + 2.0 + 0.5*32.0/25.4 - (2 + 3*4)/25.4
+
+    xStep = 4.0/25.4 
+    yStep = 4.0/25.5
+
+    placer = ComponentPlacer('led_array.brd')
+
+    xHeader = xOffset + 2.0 + 0.5*32.0/25.4 
+    yHeader1 = yOffset + 2.0 + 32.0/25.4 - 4.0/25.4
+    yHeader2 = yOffset + 2.0 + 4.0/25.4
+    angHeader = 0
+
+    placer.setModulePos('P1',xHeader, yHeader1, angHeader)
+    placer.setModulePos('P2',xHeader, yHeader2, angHeader)
+
+    for i in range(0,xNum):
+        for j in range(0,yNum):
+
+            num = j + yNum*i + 1
+            name = 'D{0}'.format(num)
+
+            x = xStart + j*xStep
+            y = yStart + i*yStep
+
+
+            #if i%2==0:
+            #    ang = 240 
+            #else:
+            #    ang = 3360
+
+            ang = 150
+
+
+            print(i,j, ang)
+
+            placer.setModulePos(name,x,y,ang)
+
+
+    placer.write()
+

led_array_3mm/brd_tools.py~

+"""
+Copyright 2010  IO Rodeo Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+from __future__ import print_function
+from __future__ import division
+import sys
+import numpy
+
+class ComponentPlacer(object):
+
+    def __init__(self,filename):
+        """
+        Read the file and get list of file lines and dictionary of modules.
+        """
+        self.filename = filename
+        self.lines = self.readFile()
+        self.moduleDict = self.getModuleDict()
+
+    def readFile(self):
+        """
+        Read the file and return a list of all lines.
+        """
+        with open(self.filename,'r') as fid:
+            lines = fid.readlines()
+        return lines
+
+    def getModuleDict(self):
+        """
+        Get a dictionary of all modules.
+        """
+        inModule = False
+        moduleDict = {}
+        # Loop over all lines in file
+        for i, line in enumerate(self.lines):
+            splitLine = line.split()
+            if splitLine:
+                if inModule:
+                    # We are in a module get lines, module reference and determine when
+                    # module ends.
+                    moduleLines.append((i,line))
+                    if splitLine[0] == '$EndMODULE':
+                        inModule = False
+                        if moduleRef is not None:
+                            moduleDict[moduleRef] = moduleLines
+                        else:
+                            raise ValueError, 'module has no reference'
+                    else:
+                        if splitLine[0] == 'T0':
+                            moduleRef =  splitLine[-1][1:-1]
+                else:
+                    # We are not in module .. look for module start.
+                    if splitLine[0] == '$MODULE':
+                        inModule = True
+                        moduleLines = [(i,line)]
+                        moduleRef = None
+        return moduleDict
+
+    def setModulePos(self,name,x,y,ang):
+        """
+        Set position of current modules. The values for x and y should be given in inches and
+        ang in degrees.
+
+        Note, this function should really read the module template form the .mod library file.
+        """
+        moduleLines = self.moduleDict[name]
+
+        # Set position of the module itself
+        # 
+        # Note, it might make sense to make rotations relative ... or to read 
+        # The template from the .mod file. 
+        # 
+        posFound = False
+        for moduleIndex, lineData in enumerate(moduleLines):
+            linesIndex, line = lineData
+            splitLine = line.split()
+            if splitLine[0] == 'Po' and len(splitLine) > 3:
+
+                # Get new positions and angle
+                curX = int(splitLine[1])
+                newX = round(curX + 10000*x)
+                curY = int(splitLine[2])
+                newY = round(curY + 10000*y)
+                curAng = int(splitLine[3])
+                newAng = (curAng + round(ang))%3600
+
+                # write new position and angle
+                splitLine[1] = '%d'%(round(newX),)
+                splitLine[2] = '%d'%(round(newY),)
+                splitLine[3] = '%d'%(round(newAng),)
+                for k, val in enumerate(splitLine):
+                    if k == 0:
+                        newLine = '%s'%(val,)
+                    else:
+                        newLine = '%s %s'%(newLine, val)
+                newLine = '%s\n'%(newLine,)
+                self.lines[linesIndex] = newLine
+                moduleLines[moduleIndex] = (linesIndex,newLine)
+                posFound = True
+                break
+        # Check to see if modules was found - this is a kludge
+        if not posFound:
+            raise ValueError, 'module, %s,  position not found'%(name,)
+
+        # Set position of pads in module
+        for moduleIndex, lineData in enumerate(moduleLines):
+            linesIndex, line = lineData
+            splitLine = line.split()
+            if splitLine[0] == 'Sh':
+                curAng = int(splitLine[-1])
+                newAng = (curAng + round(ang))%3600
+                splitLine[-1] = '%d'%(newAng,)
+                for k, val in enumerate(splitLine):
+                    if k == 0:
+                        newLine = '%s'%(val,)
+                    else:
+                        newLine = '%s %s'%(newLine, val)
+                newLine = '%s\n'%(newLine,)
+                self.lines[linesIndex] = newLine
+                moduleLines[moduleIndex] = (linesIndex,newLine)
+
+    def write(self,filename=None):
+        """
+        Write new .brd file. If filename argument is not specified the
+        same name as the original file will be used.
+        """
+        if filename is None:
+            filename = self.filename
+        with open(filename,'w') as fid:
+            for line in self.lines:
+                fid.write(line)
+
+    def printLines(self):
+        """
+        Prints all lines in the file.
+        """
+        for i, line in enumerate(self.lines):
+            print(i, line)
+
+
+class SegmentDrawer(object):
+
+    def __init__(self,filename):
+        """
+        Read the file and get list of file lines and dictionary of modules.
+        """
+        self.filename = filename
+        self.lines = self.readFile()
+        self.getNumDrawings()
+        self.getInsertPos()
+
+    def readFile(self):
+        """
+        Read the file and return a list of all lines.
+        """
+        with open(self.filename,'r') as fid:
+            lines = fid.readlines()
+        return lines 
+
+    def getNumDrawings(self):
+        """
+        Gets the number of drawings currently in .brd file and line number of
+        the Ndraw line. 
+        """
+        found = False
+        for i, line in enumerate(self.lines):
+            lineSplit = line.split()
+            if not lineSplit:
+                continue
+            if lineSplit[0] == 'Ndraw':
+                self.numDrawings = int(lineSplit[1])
+                self.numDrawingsLine = i
+                found = True
+                break
+        if not found:
+            raise ValueEror, 'number of drawings Ndraw not found in file %s'%(self.filename,)
+
+    def getInsertPos(self):
+        """
+        Get line number at which to start segemnet insertion.
+        """
+        for i, line in enumerate(self.lines):
+            lineSplit = line.split()
+            if not lineSplit:
+                continue
+            if lineSplit[0] in ('$EndSETUP', '$EndMODULE'):
+                self.insertPos = i+1
+
+    def insertLine(self, lineStr):
+        """
+        Insert a line into the brd file
+        """
+        self.lines.insert(self.insertPos,lineStr + '\n')
+        self.insertPos += 1
+
+    def setLine(self, lineNum, lineStr):
+        """
+        Set the line number lineNum in the file to lineStr
+        """
+        self.lines[lineNum] = lineStr + '\n'
+
+    def incrNumDrawings(self):
+        """
+        Increment number of drawings.
+        """
+        self.numDrawings += 1
+        self.setLine(self.numDrawingsLine,'Ndraw %d'%(self.numDrawings,))
+
+    def addLineSegment(self,x0,y0,x1,y1,width, layer='edges_pcb'):
+        """
+        Add a line segment to the brd file.
+        """
+        _layer = layer.lower()
+        if _layer == 'edges_pcb':
+            layerNum = 28
+        elif _layer == 'drawing':
+            layerNum = 24
+        elif _layer == 'comments':
+            layerNum = 25
+        else:
+            raise ValueError, 'unknown layer: %s'%(layer,)
+
+        # Scale values to 1/10000 of and inch
+        _x0 = 10000*x0
+        _y0 = 10000*y0
+        _x1 = 10000*x1
+        _y1 = 10000*y1
+        _width = 10000*width
+        
+        # Add line segment
+        self.insertLine('$DRAWSEGMENT')
+        self.insertLine('Po 0 %d %d %d %d %d'%(_x0, _y0, _x1, _y1, _width))
+        self.insertLine('De %d 0 900 0 0'%(layerNum,))
+        self.insertLine('$EndDRAWSEGMENT')
+
+        # Update number of drawings
+        self.incrNumDrawings()
+
+    def addRectangle(self, upperRight, lowerLeft, width, layer='edges_pcb'):
+        """
+        Add rectange to brd file by specifying the upperRight and lowerLeft 
+        corners of the board.
+        """
+        x0, y0 = upperRight
+        x1, y1 = lowerLeft
+        self.addLineSegment(x0,y0,x0,y1,width,layer=layer)
+        self.addLineSegment(x0,y1,x1,y1,width,layer=layer)
+        self.addLineSegment(x1,y1,x1,y0,width,layer=layer)
+        self.addLineSegment(x1,y0,x0,y0,width,layer=layer)
+
+    def addCircularNgon(self,n,center,radius,width,rotAng=0,layer='edges_pcb'):
+        """
+        Add circular n-gon where n is the number of sides
+        """
+        cx, cy = center
+        t = numpy.arange(0,n)/float(n)
+        rotAngRad = rotAng*numpy.pi/180.0
+
+        xPoints = cx + radius*numpy.cos(2*numpy.pi*t + rotAngRad)
+        yPoints = cy + radius*numpy.sin(2*numpy.pi*t + rotAngRad)
+
+        for i in range(0,n):
+            j = (i+1)%n
+            x0 = xPoints[i]
+            y0 = yPoints[i]
+            x1 = xPoints[j]
+            y1 = yPoints[j]
+            self.addLineSegment(x0,y0,x1,y1,width,layer=layer)
+        
+    def write(self,filename=None):
+        """
+        Write new .brd file. If filename argument is not specified the
+        same name as the original file will be used.
+        """
+
+        # Update the number of drawings
+
+        if filename is None:
+            filename = self.filename
+        with open(filename,'w') as fid:
+            for line in self.lines:
+                fid.write(line)
+
+# -----------------------------------------------------------------------------
+if __name__ == '__main__':
+    import math
+
+    xNum = 8 
+    yNum = 8
+
+    xOffset = -3.2674
+    yOffset = -3.7674
+
+    xStart = xOffset + 2.0 + 0.5*32.0/25.4 - (2 + 3*4)/25.4
+    yStart = yOffset + 2.0 + 0.5*32.0/25.4 - (2 + 3*4)/25.4
+
+    xStep = 4.0/25.4 
+    yStep = 4.0/25.5
+
+    placer = ComponentPlacer('led_array.brd')
+
+    xHeader = xOffset + 2.0 + 0.5*32.0/25.4 
+    yHeader1 = yOffset + 2.0 + 32.0/25.4 - 4.0/25.4
+    yHeader2 = yOffset + 2.0 + 4.0/25.4
+    angHeader = 0
+
+    placer.setModulePos('P1',xHeader, yHeader1, angHeader)
+    placer.setModulePos('P2',xHeader, yHeader2, angHeader)
+
+    for i in range(0,xNum):
+        for j in range(0,yNum):
+
+            num = j + yNum*i + 1
+            name = 'D{0}'.format(num)
+
+            x = xStart + j*xStep
+            y = yStart + i*yStep
+
+
+            #if i%2==0:
+            #    ang = 240 
+            #else:
+            #    ang = 3360
+
+            ang = 150
+
+
+            print(i,j, ang)
+
+            placer.setModulePos(name,x,y,ang)
+
+
+    placer.write()
+

led_array_3mm/gerber_v0p1/led_array-Back.gbl

+G04 (created by PCBNEW-RS274X (2011-aug-04)-testing) date Mon 11 Feb 2013 10:39:23 AM PST*
+G01*
+G70*
+G90*
+%MOIN*%
+G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
+%FSLAX34Y34*%
+G04 APERTURE LIST*
+%ADD10C,0.006000*%
+%ADD11C,0.040000*%
+%ADD12R,0.040000X0.040000*%
+%ADD13C,0.055000*%
+%ADD14C,0.035000*%
+%ADD15C,0.016000*%
+G04 APERTURE END LIST*
+G54D10*
+G54D11*
+X25799Y-21575D03*
+X24799Y-21575D03*
+X23799Y-21575D03*
+G54D12*
+X22799Y-21575D03*
+G54D11*
+X26799Y-21575D03*
+X27799Y-21575D03*
+X28799Y-21575D03*
+X29799Y-21575D03*
+X25799Y-31024D03*
+X24799Y-31024D03*
+X23799Y-31024D03*
+G54D12*
+X22799Y-31024D03*
+G54D11*
+X26799Y-31024D03*
+X27799Y-31024D03*
+X28799Y-31024D03*
+X29799Y-31024D03*
+G54D13*
+X31328Y-28760D03*
+X32294Y-28502D03*
+X29753Y-28760D03*
+X30719Y-28502D03*
+X28178Y-28760D03*
+X29144Y-28502D03*
+X26604Y-28760D03*
+X27570Y-28502D03*
+X25029Y-28760D03*
+X25995Y-28502D03*
+X23454Y-28760D03*
+X24420Y-28502D03*
+X21879Y-28760D03*
+X22845Y-28502D03*
+X20304Y-28760D03*
+X21270Y-28502D03*
+X31328Y-27191D03*
+X32294Y-26933D03*
+X29753Y-27191D03*
+X30719Y-26933D03*
+X28178Y-27191D03*
+X29144Y-26933D03*
+X26604Y-27191D03*
+X27570Y-26933D03*
+X25029Y-27191D03*
+X25995Y-26933D03*
+X23454Y-27191D03*
+X24420Y-26933D03*
+X21879Y-27191D03*
+X22845Y-26933D03*
+X20304Y-30328D03*
+X21270Y-30070D03*
+X21879Y-30328D03*
+X22845Y-30070D03*
+X23454Y-30328D03*
+X24420Y-30070D03*
+X25029Y-30328D03*
+X25995Y-30070D03*
+X26604Y-30328D03*
+X27570Y-30070D03*
+X28178Y-30328D03*
+X29144Y-30070D03*
+X29753Y-30328D03*
+X30719Y-30070D03*
+X31328Y-30328D03*
+X32294Y-30070D03*
+X20304Y-31897D03*
+X21270Y-31639D03*
+X21879Y-31897D03*
+X22845Y-31639D03*
+X23454Y-31897D03*
+X24420Y-31639D03*
+X25029Y-31897D03*
+X25995Y-31639D03*
+X26604Y-31897D03*
+X27570Y-31639D03*
+X28178Y-31897D03*
+X29144Y-31639D03*
+X29753Y-31897D03*
+X30719Y-31639D03*
+X31328Y-31897D03*
+X32294Y-31639D03*
+X20304Y-20916D03*
+X21270Y-20658D03*
+X21879Y-20916D03*
+X22845Y-20658D03*
+X23454Y-20916D03*
+X24420Y-20658D03*
+X25029Y-20916D03*
+X25995Y-20658D03*
+X26604Y-20916D03*
+X27570Y-20658D03*
+X28178Y-20916D03*
+X29144Y-20658D03*
+X29753Y-20916D03*
+X30719Y-20658D03*
+X31328Y-20916D03*
+X32294Y-20658D03*
+X20304Y-22485D03*
+X21270Y-22227D03*
+X21879Y-22485D03*
+X22845Y-22227D03*
+X23454Y-22485D03*
+X24420Y-22227D03*
+X25029Y-22485D03*
+X25995Y-22227D03*
+X26604Y-22485D03*
+X27570Y-22227D03*
+X28178Y-22485D03*
+X29144Y-22227D03*
+X29753Y-22485D03*
+X30719Y-22227D03*
+X31328Y-22485D03*
+X32294Y-22227D03*
+X20304Y-27191D03*
+X21270Y-26933D03*
+X31328Y-25622D03*
+X32294Y-25364D03*
+X29753Y-25622D03*
+X30719Y-25364D03*
+X28178Y-25622D03*
+X29144Y-25364D03*
+X26604Y-25622D03*
+X27570Y-25364D03*
+X25029Y-25622D03*
+X25995Y-25364D03*
+X23454Y-25622D03*
+X24420Y-25364D03*
+X21879Y-25622D03*
+X22845Y-25364D03*
+X20304Y-25622D03*
+X21270Y-25364D03*
+X31328Y-24054D03*
+X32294Y-23796D03*
+X29753Y-24054D03*
+X30719Y-23796D03*
+X28178Y-24054D03*
+X29144Y-23796D03*
+X26604Y-24054D03*
+X27570Y-23796D03*
+X25029Y-24054D03*
+X25995Y-23796D03*
+X23454Y-24054D03*
+X24420Y-23796D03*
+X21879Y-24054D03*
+X22845Y-23796D03*
+X20304Y-24054D03*
+X21270Y-23796D03*
+G54D14*
+X28594Y-26038D03*
+X24577Y-23236D03*
+X23193Y-24631D03*
+X25391Y-29409D03*
+G54D15*
+X22416Y-30641D02*
+X22799Y-30641D01*
+X22338Y-30563D02*
+X22416Y-30641D01*
+X22338Y-27440D02*
+X22338Y-30563D01*
+X22845Y-26933D02*
+X22338Y-27440D01*
+X22799Y-31024D02*
+X22799Y-30641D01*
+X25029Y-24054D02*
+X25029Y-22485D01*
+X25029Y-24054D02*
+X25029Y-25622D01*
+X25205Y-30504D02*
+X25029Y-30328D01*
+X25205Y-31721D02*
+X25205Y-30504D01*
+X25029Y-31897D02*
+X25205Y-31721D01*
+X25029Y-25622D02*
+X25029Y-27191D01*
+X25029Y-27191D02*
+X25029Y-28760D01*
+X25209Y-22305D02*
+X25029Y-22485D01*
+X25209Y-21096D02*
+X25209Y-22305D01*
+X25029Y-20916D02*
+X25209Y-21096D01*
+X25029Y-28760D02*
+X25029Y-30328D01*
+X28638Y-21736D02*
+X28799Y-21575D01*
+X28638Y-25994D02*
+X28638Y-21736D01*
+X28594Y-26038D02*
+X28638Y-25994D01*
+X28178Y-25622D02*
+X28178Y-24054D01*
+X28178Y-24054D02*
+X28178Y-22485D01*
+X28178Y-21954D02*
+X27799Y-21575D01*
+X28178Y-22485D02*
+X28178Y-21954D01*
+X28178Y-21196D02*
+X27799Y-21575D01*
+X28178Y-20916D02*
+X28178Y-21196D01*
+X28239Y-30389D02*
+X28178Y-30328D01*
+X28239Y-31836D02*
+X28239Y-30389D01*
+X28178Y-31897D02*
+X28239Y-31836D01*
+X28178Y-28760D02*
+X28178Y-30328D01*
+X28178Y-25622D02*
+X28178Y-27191D01*
+X28178Y-27191D02*
+X28178Y-28760D01*
+X27111Y-21887D02*
+X26799Y-21575D01*
+X27111Y-24905D02*
+X27111Y-21887D01*
+X27570Y-25364D02*
+X27111Y-24905D01*
+X20304Y-25622D02*
+X20304Y-24054D01*
+X20304Y-22485D02*
+X20304Y-20916D01*
+X20304Y-31897D02*
+X20304Y-30328D01*
+X20304Y-25622D02*
+X20304Y-27191D01*
+X20304Y-27191D02*
+X20304Y-28760D01*
+X20304Y-28760D02*
+X20304Y-30328D01*
+X24420Y-21954D02*
+X24420Y-22227D01*
+X24799Y-21575D02*
+X24420Y-21954D01*
+X29753Y-24054D02*
+X29753Y-25622D01*
+X29237Y-30844D02*
+X29753Y-30328D01*
+X29237Y-31044D02*
+X29237Y-30844D01*
+X29753Y-31560D02*
+X29237Y-31044D01*
+X29753Y-31897D02*
+X29753Y-31560D01*
+X29753Y-30328D02*
+X29753Y-28760D01*
+X29753Y-25622D02*
+X29753Y-27191D01*
+X29753Y-27191D02*
+X29753Y-28760D01*
+X29753Y-24054D02*
+X29753Y-22485D01*
+X30183Y-21346D02*
+X29753Y-20916D01*
+X30183Y-22055D02*
+X30183Y-21346D01*
+X29753Y-22485D02*
+X30183Y-22055D01*
+X23961Y-22620D02*
+X24577Y-23236D01*
+X23961Y-21737D02*
+X23961Y-22620D01*
+X23799Y-21575D02*
+X23961Y-21737D01*
+X31328Y-24054D02*
+X31328Y-22485D01*
+X31328Y-22485D02*
+X31328Y-20916D01*
+X31328Y-24054D02*
+X31328Y-25622D01*
+X31328Y-31897D02*
+X31328Y-30328D01*
+X31328Y-30328D02*
+X31328Y-28760D01*
+X31328Y-25622D02*
+X31328Y-27191D01*
+X31328Y-27191D02*
+X31328Y-28760D01*
+X22383Y-21991D02*
+X22799Y-21575D01*
+X22383Y-24021D02*
+X22383Y-21991D01*
+X22993Y-24631D02*
+X22383Y-24021D01*
+X23193Y-24631D02*
+X22993Y-24631D01*
+X23799Y-30691D02*
+X23799Y-31024D01*
+X24420Y-30070D02*
+X23799Y-30691D01*
+X21879Y-24054D02*
+X21879Y-22485D01*
+X21879Y-22485D02*
+X21879Y-20916D01*
+X21879Y-24054D02*
+X21879Y-25622D01*
+X21879Y-31897D02*
+X21879Y-30328D01*
+X21879Y-30328D02*
+X21879Y-28760D01*
+X21879Y-25622D02*
+X21879Y-27191D01*
+X21879Y-27191D02*
+X21879Y-28760D01*
+X23304Y-30478D02*
+X23454Y-30328D01*
+X23304Y-31747D02*
+X23304Y-30478D01*
+X23454Y-31897D02*
+X23304Y-31747D01*
+X23454Y-25622D02*
+X23454Y-27191D01*
+X23454Y-27191D02*
+X23454Y-28760D01*
+X23454Y-30328D02*
+X23454Y-28760D01*
+X25488Y-30713D02*
+X25799Y-31024D01*
+X25488Y-29506D02*
+X25488Y-30713D01*
+X25391Y-29409D02*
+X25488Y-29506D01*
+X23551Y-24151D02*
+X23454Y-24054D01*
+X23551Y-25525D02*
+X23551Y-24151D01*
+X23454Y-25622D02*
+X23551Y-25525D01*
+X23379Y-22410D02*
+X23454Y-22485D01*
+X23379Y-20991D02*
+X23379Y-22410D01*
+X23454Y-20916D02*
+X23379Y-20991D01*
+X23454Y-22485D02*
+X23454Y-24054D01*
+X26604Y-22088D02*
+X26604Y-22485D01*
+X26279Y-21763D02*
+X26604Y-22088D01*
+X26279Y-21241D02*
+X26279Y-21763D01*
+X26604Y-20916D02*
+X26279Y-21241D01*
+X26604Y-25622D02*
+X26604Y-27191D01*
+X26604Y-27191D02*
+X26604Y-28760D01*
+X26604Y-22485D02*
+X26604Y-24054D01*
+X26604Y-24054D02*
+X26604Y-25622D01*
+X27799Y-31024D02*
+X27477Y-31024D01*
+X27477Y-31024D02*
+X26604Y-31897D01*
+X26604Y-28760D02*
+X26604Y-30328D01*
+X26781Y-30328D02*
+X27477Y-31024D01*
+X26604Y-30328D02*
+X26781Y-30328D01*
+X28637Y-30862D02*
+X28799Y-31024D01*
+X28637Y-29009D02*
+X28637Y-30862D01*
+X29144Y-28502D02*
+X28637Y-29009D01*
+X30260Y-30563D02*
+X29799Y-31024D01*
+X30260Y-24255D02*
+X30260Y-30563D01*
+X30719Y-23796D02*
+X30260Y-24255D01*
+X29144Y-21041D02*
+X29144Y-20658D01*
+X29678Y-21575D02*
+X29144Y-21041D01*
+X29799Y-21575D02*
+X29678Y-21575D01*
+M02*

led_array_3mm/gerber_v0p1/led_array-Front.gtl

+G04 (created by PCBNEW-RS274X (2011-aug-04)-testing) date Mon 11 Feb 2013 10:39:23 AM PST*
+G01*
+G70*
+G90*
+%MOIN*%
+G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
+%FSLAX34Y34*%
+G04 APERTURE LIST*
+%ADD10C,0.006000*%
+%ADD11C,0.040000*%
+%ADD12R,0.040000X0.040000*%
+%ADD13C,0.055000*%
+%ADD14C,0.035000*%
+%ADD15C,0.016000*%
+G04 APERTURE END LIST*
+G54D10*
+G54D11*
+X25799Y-21575D03*
+X24799Y-21575D03*
+X23799Y-21575D03*
+G54D12*
+X22799Y-21575D03*
+G54D11*
+X26799Y-21575D03*
+X27799Y-21575D03*
+X28799Y-21575D03*
+X29799Y-21575D03*
+X25799Y-31024D03*
+X24799Y-31024D03*
+X23799Y-31024D03*
+G54D12*
+X22799Y-31024D03*
+G54D11*
+X26799Y-31024D03*
+X27799Y-31024D03*
+X28799Y-31024D03*
+X29799Y-31024D03*
+G54D13*
+X31328Y-28760D03*
+X32294Y-28502D03*
+X29753Y-28760D03*
+X30719Y-28502D03*
+X28178Y-28760D03*
+X29144Y-28502D03*
+X26604Y-28760D03*
+X27570Y-28502D03*
+X25029Y-28760D03*
+X25995Y-28502D03*
+X23454Y-28760D03*
+X24420Y-28502D03*
+X21879Y-28760D03*
+X22845Y-28502D03*
+X20304Y-28760D03*
+X21270Y-28502D03*
+X31328Y-27191D03*
+X32294Y-26933D03*
+X29753Y-27191D03*
+X30719Y-26933D03*
+X28178Y-27191D03*
+X29144Y-26933D03*
+X26604Y-27191D03*
+X27570Y-26933D03*
+X25029Y-27191D03*
+X25995Y-26933D03*
+X23454Y-27191D03*
+X24420Y-26933D03*
+X21879Y-27191D03*
+X22845Y-26933D03*
+X20304Y-30328D03*
+X21270Y-30070D03*
+X21879Y-30328D03*
+X22845Y-30070D03*
+X23454Y-30328D03*
+X24420Y-30070D03*
+X25029Y-30328D03*
+X25995Y-30070D03*
+X26604Y-30328D03*
+X27570Y-30070D03*
+X28178Y-30328D03*
+X29144Y-30070D03*
+X29753Y-30328D03*
+X30719Y-30070D03*
+X31328Y-30328D03*
+X32294Y-30070D03*
+X20304Y-31897D03*
+X21270Y-31639D03*
+X21879Y-31897D03*
+X22845Y-31639D03*
+X23454Y-31897D03*
+X24420Y-31639D03*
+X25029Y-31897D03*
+X25995Y-31639D03*
+X26604Y-31897D03*
+X27570Y-31639D03*
+X28178Y-31897D03*
+X29144Y-31639D03*
+X29753Y-31897D03*
+X30719Y-31639D03*
+X31328Y-31897D03*
+X32294Y-31639D03*
+X20304Y-20916D03*
+X21270Y-20658D03*
+X21879Y-20916D03*
+X22845Y-20658D03*
+X23454Y-20916D03*
+X24420Y-20658D03*
+X25029Y-20916D03*
+X25995Y-20658D03*
+X26604Y-20916D03*
+X27570Y-20658D03*
+X28178Y-20916D03*
+X29144Y-20658D03*
+X29753Y-20916D03*
+X30719Y-20658D03*
+X31328Y-20916D03*
+X32294Y-20658D03*
+X20304Y-22485D03*
+X21270Y-22227D03*
+X21879Y-22485D03*
+X22845Y-22227D03*
+X23454Y-22485D03*
+X24420Y-22227D03*
+X25029Y-22485D03*
+X25995Y-22227D03*
+X26604Y-22485D03*
+X27570Y-22227D03*
+X28178Y-22485D03*
+X29144Y-22227D03*
+X29753Y-22485D03*
+X30719Y-22227D03*
+X31328Y-22485D03*
+X32294Y-22227D03*
+X20304Y-27191D03*
+X21270Y-26933D03*
+X31328Y-25622D03*
+X32294Y-25364D03*
+X29753Y-25622D03*
+X30719Y-25364D03*
+X28178Y-25622D03*
+X29144Y-25364D03*
+X26604Y-25622D03*
+X27570Y-25364D03*
+X25029Y-25622D03*
+X25995Y-25364D03*
+X23454Y-25622D03*
+X24420Y-25364D03*
+X21879Y-25622D03*
+X22845Y-25364D03*
+X20304Y-25622D03*
+X21270Y-25364D03*
+X31328Y-24054D03*
+X32294Y-23796D03*
+X29753Y-24054D03*
+X30719Y-23796D03*
+X28178Y-24054D03*
+X29144Y-23796D03*
+X26604Y-24054D03*
+X27570Y-23796D03*
+X25029Y-24054D03*
+X25995Y-23796D03*
+X23454Y-24054D03*
+X24420Y-23796D03*
+X21879Y-24054D03*
+X22845Y-23796D03*
+X20304Y-24054D03*
+X21270Y-23796D03*
+G54D14*
+X28594Y-26038D03*
+X24577Y-23236D03*
+X23193Y-24631D03*
+X25391Y-29409D03*
+G54D15*
+X22644Y-26732D02*
+X22845Y-26933D01*
+X21471Y-26732D02*
+X22644Y-26732D01*
+X21270Y-26933D02*
+X21471Y-26732D01*
+X23087Y-26691D02*
+X22845Y-26933D01*
+X24178Y-26691D02*
+X23087Y-26691D01*
+X24420Y-26933D02*
+X24178Y-26691D01*
+X30719Y-26732D02*
+X30719Y-26933D01*
+X32093Y-26732D02*
+X32294Y-26933D01*
+X30719Y-26732D02*
+X32093Y-26732D01*
+X25794Y-26732D02*
+X25995Y-26933D01*
+X24621Y-26732D02*
+X25794Y-26732D01*
+X24420Y-26933D02*
+X24621Y-26732D01*
+X26196Y-26732D02*
+X25995Y-26933D01*
+X27369Y-26732D02*
+X26196Y-26732D01*
+X27570Y-26933D02*
+X27369Y-26732D01*
+X29345Y-26732D02*
+X30719Y-26732D01*
+X29144Y-26933D02*
+X29345Y-26732D01*
+X27775Y-26728D02*
+X27570Y-26933D01*
+X28939Y-26728D02*
+X27775Y-26728D01*
+X29144Y-26933D02*
+X28939Y-26728D01*
+X28266Y-26366D02*
+X28594Y-26038D01*
+X25773Y-26366D02*
+X28266Y-26366D01*
+X25029Y-25622D02*
+X25773Y-26366D01*
+X30925Y-25158D02*
+X30719Y-25364D01*
+X32088Y-25158D02*
+X30925Y-25158D01*
+X32294Y-25364D02*
+X32088Y-25158D01*
+X27369Y-25163D02*
+X27570Y-25364D01*
+X26196Y-25163D02*
+X27369Y-25163D01*
+X25995Y-25364D02*
+X26196Y-25163D01*
+X30518Y-25163D02*
+X30719Y-25364D01*
+X29345Y-25163D02*
+X30518Y-25163D01*
+X29144Y-25364D02*
+X29345Y-25163D01*
+X27779Y-25155D02*
+X27570Y-25364D01*
+X28935Y-25155D02*
+X27779Y-25155D01*
+X29144Y-25364D02*
+X28935Y-25155D01*
+X23069Y-25140D02*
+X22845Y-25364D01*
+X24196Y-25140D02*
+X23069Y-25140D01*
+X24420Y-25364D02*
+X24196Y-25140D01*
+X25794Y-25163D02*
+X25995Y-25364D01*
+X24621Y-25163D02*
+X25794Y-25163D01*
+X24420Y-25364D02*
+X24621Y-25163D01*
+X22644Y-25163D02*
+X22845Y-25364D01*
+X21471Y-25163D02*
+X22644Y-25163D01*
+X21270Y-25364D02*
+X21471Y-25163D01*
+X20773Y-23585D02*
+X20773Y-22954D01*
+X20304Y-24054D02*
+X20773Y-23585D01*
+X20773Y-22954D02*
+X20304Y-22485D01*
+X24256Y-22954D02*
+X20773Y-22954D01*
+X24332Y-22878D02*
+X24256Y-22954D01*
+X24726Y-22878D02*
+X24332Y-22878D01*
+X24802Y-22954D02*
+X24726Y-22878D01*
+X25406Y-22954D02*
+X24802Y-22954D01*
+X25492Y-22868D02*
+X25406Y-22954D01*
+X25492Y-21882D02*
+X25492Y-22868D01*
+X25799Y-21575D02*
+X25492Y-21882D01*
+X23046Y-22026D02*
+X22845Y-22227D01*
+X24219Y-22026D02*
+X23046Y-22026D01*
+X24420Y-22227D02*
+X24219Y-22026D01*
+X21511Y-21986D02*
+X21270Y-22227D01*
+X22604Y-21986D02*
+X21511Y-21986D01*
+X22845Y-22227D02*
+X22604Y-21986D01*
+X27838Y-21959D02*
+X27570Y-22227D01*
+X28876Y-21959D02*
+X27838Y-21959D01*
+X29144Y-22227D02*
+X28876Y-21959D01*
+X25118Y-21575D02*
+X24799Y-21575D01*
+X25539Y-21154D02*
+X25118Y-21575D01*
+X26088Y-21154D02*
+X25539Y-21154D01*
+X26263Y-21329D02*
+X26088Y-21154D01*
+X26263Y-21959D02*
+X26263Y-21329D01*
+X27302Y-21959D02*
+X26263Y-21959D01*
+X27570Y-22227D02*
+X27302Y-21959D01*
+X26263Y-21959D02*
+X25995Y-22227D01*
+X30960Y-21986D02*
+X30719Y-22227D01*
+X32053Y-21986D02*
+X30960Y-21986D01*
+X32294Y-22227D02*
+X32053Y-21986D01*
+X29412Y-21959D02*
+X29144Y-22227D01*
+X30451Y-21959D02*
+X29412Y-21959D01*
+X30719Y-22227D02*
+X30451Y-21959D01*
+X29002Y-23236D02*
+X24577Y-23236D01*
+X29753Y-22485D02*
+X29002Y-23236D01*
+X30751Y-24631D02*
+X23193Y-24631D01*
+X31328Y-24054D02*
+X30751Y-24631D01*
+X21471Y-29869D02*
+X21270Y-30070D01*
+X22644Y-29869D02*
+X21471Y-29869D01*
+X22845Y-30070D02*
+X22644Y-29869D01*
+X22845Y-30374D02*
+X22845Y-30070D01*
+X23495Y-31024D02*
+X22845Y-30374D01*
+X23799Y-31024D02*
+X23495Y-31024D01*
+X30920Y-29869D02*
+X30719Y-30070D01*
+X32093Y-29869D02*
+X30920Y-29869D01*
+X32294Y-30070D02*
+X32093Y-29869D01*
+X29345Y-29869D02*
+X29144Y-30070D01*
+X30518Y-29869D02*
+X29345Y-29869D01*
+X30719Y-30070D02*
+X30518Y-29869D01*
+X27570Y-29869D02*
+X27570Y-30070D01*
+X28943Y-29869D02*
+X27570Y-29869D01*
+X29144Y-30070D02*
+X28943Y-29869D01*
+X26196Y-29869D02*
+X27570Y-29869D01*
+X25995Y-30070D02*
+X26196Y-29869D01*
+X24625Y-29865D02*
+X24420Y-30070D01*
+X25790Y-29865D02*
+X24625Y-29865D01*
+X25995Y-30070D02*
+X25790Y-29865D01*
+X24420Y-31024D02*
+X24799Y-31024D01*
+X23925Y-30529D02*
+X24420Y-31024D01*
+X23925Y-30111D02*
+X23925Y-30529D01*
+X23033Y-29219D02*
+X23925Y-30111D01*
+X22338Y-29219D02*
+X23033Y-29219D01*
+X21879Y-28760D02*
+X22338Y-29219D01*
+X24103Y-29409D02*
+X25391Y-29409D01*
+X23454Y-28760D02*
+X24103Y-29409D01*
+X22644Y-31438D02*
+X22845Y-31639D01*
+X21471Y-31438D02*
+X22644Y-31438D01*
+X21270Y-31639D02*
+X21471Y-31438D01*
+X23046Y-31438D02*
+X22845Y-31639D01*
+X24219Y-31438D02*
+X23046Y-31438D01*
+X24420Y-31639D02*
+X24219Y-31438D01*
+X29375Y-31408D02*
+X29144Y-31639D01*
+X30488Y-31408D02*
+X29375Y-31408D01*
+X30719Y-31639D02*
+X30488Y-31408D01*
+X27570Y-31523D02*
+X27570Y-31639D01*
+X27685Y-31408D02*
+X27570Y-31523D01*
+X28913Y-31408D02*
+X27685Y-31408D01*
+X29144Y-31639D02*
+X28913Y-31408D01*
+X27298Y-31523D02*
+X26799Y-31024D01*
+X27570Y-31523D02*
+X27298Y-31523D01*
+X30960Y-31398D02*
+X30719Y-31639D01*
+X32053Y-31398D02*
+X30960Y-31398D01*
+X32294Y-31639D02*
+X32053Y-31398D01*
+X26610Y-31024D02*
+X25995Y-31639D01*
+X26799Y-31024D02*
+X26610Y-31024D01*
+X24651Y-31408D02*
+X24420Y-31639D01*
+X25764Y-31408D02*
+X24651Y-31408D01*
+X25995Y-31639D02*
+X25764Y-31408D01*
+X30719Y-28502D02*
+X30719Y-28301D01*
+X32093Y-28301D02*
+X30719Y-28301D01*
+X32294Y-28502D02*
+X32093Y-28301D01*
+X29345Y-28301D02*
+X29144Y-28502D01*
+X30719Y-28301D02*
+X29345Y-28301D01*
+X22644Y-28301D02*
+X22845Y-28502D01*
+X21471Y-28301D02*
+X22644Y-28301D01*
+X21270Y-28502D02*
+X21471Y-28301D01*
+X27570Y-28502D02*
+X27570Y-28301D01*
+X28943Y-28301D02*
+X29144Y-28502D01*
+X27570Y-28301D02*
+X28943Y-28301D01*
+X23046Y-28301D02*
+X22845Y-28502D01*
+X24219Y-28301D02*
+X23046Y-28301D01*
+X24420Y-28502D02*
+X24219Y-28301D01*
+X26196Y-28301D02*
+X27570Y-28301D01*
+X25995Y-28502D02*
+X26196Y-28301D01*
+X24662Y-28260D02*
+X24420Y-28502D01*
+X25753Y-28260D02*
+X24662Y-28260D01*
+X25995Y-28502D02*
+X25753Y-28260D01*
+X32030Y-23532D02*
+X30719Y-23532D01*
+X32294Y-23796D02*
+X32030Y-23532D01*
+X30719Y-23532D02*
+X30719Y-23796D01*
+X29408Y-23532D02*
+X30719Y-23532D01*
+X29144Y-23796D02*
+X29408Y-23532D01*
+X27861Y-23505D02*
+X27570Y-23796D01*
+X28853Y-23505D02*
+X27861Y-23505D01*
+X29144Y-23796D02*
+X28853Y-23505D01*
+X26196Y-23595D02*
+X25995Y-23796D01*
+X27369Y-23595D02*
+X26196Y-23595D01*
+X27570Y-23796D02*
+X27369Y-23595D01*
+X22644Y-23595D02*
+X22845Y-23796D01*
+X21471Y-23595D02*
+X22644Y-23595D01*
+X21270Y-23796D02*
+X21471Y-23595D01*
+X24621Y-23595D02*
+X24420Y-23796D01*
+X25794Y-23595D02*
+X24621Y-23595D01*
+X25995Y-23796D02*
+X25794Y-23595D01*
+X23045Y-23596D02*
+X22845Y-23796D01*
+X24220Y-23596D02*
+X23045Y-23596D01*
+X24420Y-23796D02*
+X24220Y-23596D01*
+X32070Y-20434D02*
+X32294Y-20658D01*
+X30943Y-20434D02*
+X32070Y-20434D01*
+X30719Y-20658D02*
+X30943Y-20434D01*
+X30716Y-20658D02*
+X29799Y-21575D01*
+X30719Y-20658D02*
+X30716Y-20658D01*
+X27795Y-20433D02*
+X27570Y-20658D01*
+X28919Y-20433D02*
+X27795Y-20433D01*
+X29144Y-20658D02*
+X28919Y-20433D01*
+X26219Y-20434D02*
+X25995Y-20658D01*
+X27346Y-20434D02*
+X26219Y-20434D01*
+X27570Y-20658D02*
+X27346Y-20434D01*
+X24644Y-20434D02*
+X24420Y-20658D01*
+X25771Y-20434D02*
+X24644Y-20434D01*
+X25995Y-20658D02*
+X25771Y-20434D01*
+X23069Y-20434D02*
+X22845Y-20658D01*
+X24196Y-20434D02*
+X23069Y-20434D01*
+X24420Y-20658D02*
+X24196Y-20434D01*
+X21494Y-20434D02*
+X21270Y-20658D01*
+X22621Y-20434D02*
+X21494Y-20434D01*
+X22845Y-20658D02*
+X22621Y-20434D01*
+M02*

led_array_3mm/gerber_v0p1/led_array-Mask_Back.gbs

+G04 (created by PCBNEW-RS274X (2011-aug-04)-testing) date Mon 11 Feb 2013 10:39:23 AM PST*
+G01*
+G70*
+G90*
+%MOIN*%
+G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
+%FSLAX34Y34*%
+G04 APERTURE LIST*
+%ADD10C,0.006000*%
+%ADD11C,0.060000*%
+%ADD12R,0.060000X0.060000*%
+G04 APERTURE END LIST*
+G54D10*
+G54D11*
+X25799Y-21575D03*
+X24799Y-21575D03*
+X23799Y-21575D03*
+G54D12*
+X22799Y-21575D03*
+G54D11*
+X26799Y-21575D03*
+X27799Y-21575D03*
+X28799Y-21575D03*
+X29799Y-21575D03*
+X25799Y-31024D03*
+X24799Y-31024D03*
+X23799Y-31024D03*
+G54D12*
+X22799Y-31024D03*
+G54D11*
+X26799Y-31024D03*
+X27799Y-31024D03*
+X28799Y-31024D03*
+X29799Y-31024D03*
+M02*

led_array_3mm/gerber_v0p1/led_array-Mask_Front.gts

+G04 (created by PCBNEW-RS274X (2011-aug-04)-testing) date Mon 11 Feb 2013 10:39:23 AM PST*
+G01*
+G70*
+G90*
+%MOIN*%
+G04 Gerber Fmt 3.4, Leading zero omitted, Abs format*
+%FSLAX34Y34*%
+G04 APERTURE LIST*
+%ADD10C,0.006000*%
+%ADD11C,0.060000*%
+%ADD12R,0.060000X0.060000*%
+%ADD13C,0.075000*%
+G04 APERTURE END LIST*
+G54D10*
+G54D11*
+X25799Y-21575D03*
+X24799Y-21575D03*
+X23799Y-21575D03*
+G54D12*