# Python: module gerber_lib

gerber_lib | index /usr/share/reprap/plugins/import/gerber_lib.py

`Licenced under GNU v2 and the 'I'm not going to help you kill people licence'. The latter overrules the former.
I'm not going to help you kill people licence v1:
The use of this software in any form for any purposes relating to any form of military activity or
research either directly or via subcontracts is strictly prohibited.
Any company or organisation affiliated with any military organisations either directly or through
subcontracts are strictly prohibited from using any part of this software.
GNU licence:
RepRap Gerber Plotter is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
RepRap Gerber Plotter is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details. You should have received a copy of
the GNU General Public License along with File Hunter; if not, write to
the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA`

Modules

``

math | time |  |

Classes

``

aperture
apertureMacro
gerber
gerberFlash
gerberTrace

class aperture
`` | `# Class for gerber aperture. Reads line from gerber file and extracts code, type & modifiers`

Methods defined here:

__init__(self, paramString, units)

class apertureMacro
`` | `#Class for gerber aperture macro`

Methods defined here:

__init__(self, paramString, units)

class gerber

``

Methods defined here:

__init__(self, fileName)

cmdDcode(self, paramString)
  `#Handle D code - weird eagle inconsistancy?`

cmdGcode(self, gstring)
  `# Handle a G code`

cmdMisc(self, mstring)
  `# Handle an M code`

cmdMove(self, moveString)
  `# Hande a move`

cmdParameter(self, paramString)
  `# Handle a parameter`

parseLines(self, lines)
  `# Parse all lines of the gerber file`

selectTool(self, tool)

class gerberFlash
`` | `# Class for a gerber flash (move and flash aperture)`

Methods defined here:

__init__(self, x, y, aperture)

printFlash(self)

class gerberTrace
`` | `# Class for a gerber trace (aperture open move)`

Methods defined here:

__init__(self, x1, y1, x2, y2, aperture)

printTrace(self)

Data
`` |  | FLASH = 1 FS_ABSOLUTE = 1 FS_INCREMENTAL = 2 STROKE = 2 const_mmPerInch = 25.399999999999999