Exemplo n.º 1
0
 def test_units(self):
     """ Capture absence of units. """
     layout = Layout()
     layout.units = None
     layout.layers.append(Layer())
     design = Design()
     design.layout = layout
     writer = Writer()
     writer.write(design)
Exemplo n.º 2
0
 def test_units(self):
     """ Capture absence of units. """
     layout = Layout()
     layout.units = None
     layout.layers.append(Layer())
     design = Design()
     design.layout = layout
     writer = Writer()
     writer.write(design)
Exemplo n.º 3
0
 def test_images(self):
     """ Capture images with no data. """
     layer = Layer()
     layer.images.append(Image())
     layout = Layout()
     layout.units = 'mm'
     layout.layers.append(layer)
     design = Design()
     design.layout = layout
     writer = Writer()
     writer.write(design)
Exemplo n.º 4
0
 def test_images(self):
     """ Capture images with no data. """
     layer = Layer()
     layer.images.append(Image())
     layout = Layout()
     layout.units = 'mm'
     layout.layers.append(layer)
     design = Design()
     design.layout = layout
     writer = Writer()
     writer.write(design)
Exemplo n.º 5
0
    def __init__(self, ignore_unknown=True):
        self.ignore_unknown = ignore_unknown
        self.layout = Layout()
        self.layer_buff = None
        self.macro_buff = None
        self.img_buff = Image()
        self.trace_buff = TraceBuffer()
        self.fill_buff = []

        # establish gerber defaults
        self.params = {
            'AS': AxisDef('x', 'y'),  # axis select
            'FS': None,  # format spec
            'MI': AxisDef(0, 0),  # mirror image
            'MO': 'IN',  # mode: inches/mm
            'OF': AxisDef(0, 0),  # offset
            'SF': AxisDef(1, 1),  # scale factor
            'IJ': AxisDef(
                ('L', 0),  # image justify
                ('L', 0)),
            'IO': AxisDef(0, 0),  # image offset
            'IP': True,  # image polarity
            'IR': 0
        }  # image rotation

        # simulate a photo plotter
        self.status = {
            'x': 0,
            'y': 0,
            'draw': 'OFF',
            'interpolation': 'LINEAR',
            'aperture': None,
            'outline_fill': False,
            'multi_quadrant': False,
            'units': None,
            'incremental_coords': None
        }
Exemplo n.º 6
0
 def test_layers(self):
     """ Capture absence of layers. """
     design = Design()
     design.layout = Layout()
     writer = Writer()
     writer.write(design)