def __init__(self, name):
        Node.__init__(self)

        self.name = name
        self.description = None
        self.tags = None
        self.attribute = None
Example #2
0
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.start_pos = Point2D(kwargs['start'])
        self.end_pos = Point2D(kwargs['end'])

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')
 def __init__(self, **kwargs):
     Node.__init__(self)
     self.at = Vector2D(kwargs.get('at', (0, 0)))
     self.radius = float(kwargs['radius'])
     self.width = float(kwargs['width'])
     self.layers = kwargs['layers']
     self.number = kwargs.get('number', "")
Example #4
0
    def __init__(self, **kwargs):
        Node.__init__(self)
        geometricCircle.__init__(self, Vector2D(kwargs['center']),
                                 float(kwargs['radius']))

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')
 def __init__(self, **kwargs):
     Node.__init__(self)
     self.filename = kwargs['filename']
     self.at = Vector3D(kwargs.get('at', [0, 0, 0]))
     self.offset = Vector3D(kwargs.get('offset', [0, 0, 0]))
     self.scale = Vector3D(kwargs.get('scale', [1, 1, 1]))
     self.rotate = Vector3D(kwargs.get('rotate', [0, 0, 0]))
Example #6
0
    def __init__(self,
                 keycap_type: str = None,
                 spacing: float = None,
                 x_spacing: float = None,
                 y_spacing: float = None,
                 width: float = None,
                 rotation: float = 0,
                 x_offset: float = 0,
                 y_offset: float = 0):

        Node.__init__(self)

        if spacing is not None:
            self.x_spacing = spacing
            self.y_spacing = spacing
        elif x_spacing is None or y_spacing is None:
            raise Exception('Keycap spacing not specified')
        else:
            self.x_spacing = x_spacing
            self.y_spacing = y_spacing

        self.width = width
        self.rotation = rotation
        self.x_offset = x_offset
        self.y_offset = y_offset

        if keycap_type == 'regular':
            self.virtual_childs = self._init_regular_keycap()
        elif keycap_type == 'ISOEnter':
            self.virtual_childs = self._init_ISOEnter_keycap()
        else:
            raise Exception('Keycap type not supported')
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.start_pos = Point(kwargs["start"], **kwargs)
        self.end_pos = Point(kwargs["end"], **kwargs)

        self.layer = kwargs.get("layer", "F.SilkS")
        self.width = kwargs.get("width")
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.radius_ratio = 0

        self._initNumber(**kwargs)
        self._initType(**kwargs)
        self._initShape(**kwargs)
        self._initPosition(**kwargs)
        self._initSize(**kwargs)
        self._initOffset(**kwargs)
        self._initDrill(**kwargs)  # requires pad type and offset
        self._initSolderPasteMargin(**kwargs)
        self._initSolderPasteMarginRatio(**kwargs)
        self._initSolderMaskMargin(**kwargs)
        self._initLayers(**kwargs)
        self._initMirror(**kwargs)

        if self.shape == self.SHAPE_OVAL and self.size[0] == self.size[1]:
            self.shape = self.SHAPE_CIRCLE

        if self.shape == Pad.SHAPE_OVAL or self.shape == Pad.SHAPE_CIRCLE:
            self.radius_ratio = 0.5
        if self.shape == Pad.SHAPE_ROUNDRECT:
            self._initRadiusRatio(**kwargs)

        if self.shape == Pad.SHAPE_CUSTOM:
            self._initAnchorShape(**kwargs)
            self._initShapeInZone(**kwargs)

            self.primitives = []
            if 'primitives' not in kwargs:
                raise KeyError('primitives must be declared for custom pads')

            for p in kwargs['primitives']:
                self.addPrimitive(p)
Example #9
0
    def __init__(self, name):
        Node.__init__(self)

        self.name = name
        self.description = None
        self.tags = None
        self.attribute = None
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.start_pos = Vector2D(kwargs['start'])
        self.end_pos = Vector2D(kwargs['end'])

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')
Example #11
0
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.radius_ratio = 0

        self._initNumber(**kwargs)
        self._initType(**kwargs)
        self._initShape(**kwargs)
        self._initPosition(**kwargs)
        self._initSize(**kwargs)
        self._initOffset(**kwargs)
        self._initDrill(**kwargs)  # requires pad type and offset
        self._initSolderPasteMargin(**kwargs)
        self._initSolderPasteMarginRatio(**kwargs)
        self._initSolderMaskMargin(**kwargs)
        self._initLayers(**kwargs)
        self._initMirror(**kwargs)

        if self.shape == self.SHAPE_OVAL and self.size[0] == self.size[1]:
            self.shape = self.SHAPE_CIRCLE

        if self.shape == Pad.SHAPE_OVAL or self.shape == Pad.SHAPE_CIRCLE:
            self.radius_ratio = 0.5
        if self.shape == Pad.SHAPE_ROUNDRECT:
            self._initRadiusRatio(**kwargs)

        if self.shape == Pad.SHAPE_CUSTOM:
            self._initAnchorShape(**kwargs)
            self._initShapeInZone(**kwargs)

            self.primitives = []
            if 'primitives' not in kwargs:
                raise KeyError('primitives must be declared for custom pads')

            for p in kwargs['primitives']:
                self.addPrimitive(p)
    def __init__(self, **kwargs):
        Node.__init__(self)

        #
        self.virtual_childs = []
        #
        self._initPosition(**kwargs)
        self._initSize(**kwargs)
        self._initFootPrint(**kwargs)
        #
        #
        #
        self._initDesriptionNode(**kwargs)
        self._initTagNode(**kwargs)
        self._initAttributeNode(**kwargs)
        self._initFile3DNameNode(**kwargs)
        self._initExtraTextNode(**kwargs)

        self.extraffablines = kwargs.get('extraffablines')
        self.typeOfBox = str(kwargs.get('typeOfBox'))
        self.pins = kwargs.get('pins')

        #
        # Create foot print parts
        #
        #
        self._createPinsNode()
        self._createFFabLine()
        self._createPin1MarkerLine()
        self._createFSilkSLine()
        self._createFCrtYdLine()
Example #13
0
    def __init__(self, **kwargs):
        Node.__init__(self)

        #
        self.virtual_childs = []
        #
        self._initPosition(**kwargs)
        self._initSize(**kwargs)
        self._initFootPrint(**kwargs)
        #
        #
        #
        self._initDesriptionNode(**kwargs)
        self._initTagNode(**kwargs)
        self._initAttributeNode(**kwargs)
        self._initFile3DNameNode(**kwargs)
        self._initExtraTextNode(**kwargs)

        self.extraffablines = kwargs.get('extraffablines')
        self.typeOfBox = str(kwargs.get('typeOfBox'))
        self.pins = kwargs.get('pins')

        #
        # Create foot print parts
        #
        #
        self._createPinsNode()
        self._createFFabLine()
        self._createPin1MarkerLine()
        self._createFSilkSLine()
        self._createFCrtYdLine()
 def __init__(self, **kwargs):
     Node.__init__(self)
     self._initPincount(**kwargs)
     self._initIncrement(**kwargs)
     self._initInitialNumber(**kwargs)
     self._initSpacing(**kwargs)
     self._initStartingPosition(**kwargs)
     self.virtual_childs = self._createPads(**kwargs)
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.nodes = []
        for n in kwargs['nodes']:
            self.nodes.append(Point2D(n))

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')
Example #16
0
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.polygone_line = kwargs['polygone']

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')

        self.virtual_childs = self._createChildNodes(self.polygone_line)
Example #17
0
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.center_pos = Point(kwargs['center'])
        self.start_pos = Point(kwargs['start'])
        self.angle = kwargs['angle']

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.center_pos = Point(kwargs['center'])
        self.start_pos = Point(kwargs['start'])
        self.angle = kwargs['angle']

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.polygone_line = kwargs['polygone']

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')

        self.virtual_childs = self._createChildNodes(self.polygone_line)
 def __init__(self, **kwargs):
     Node.__init__(self)
     self._initPincount(**kwargs)
     self._initInitialNumber(**kwargs)
     self._initIncrement(**kwargs)
     self._initSpacing(**kwargs)
     self._initStartingPosition(**kwargs)
     self.virtual_childs = self._createPads(**kwargs)
    def __init__(self, **kwargs):
        Node.__init__(self)

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')

        self._initPolyPoint(**kwargs)

        self.virtual_childs = self._createChildNodes(self.nodes)
Example #22
0
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.start_pos = Vector2D(kwargs['start'])
        self.end_pos = Vector2D(kwargs['end'])

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width', 0.12)  # TODO: auto detection

        self.virtual_childs = self._createChildNodes(self.start_pos, self.end_pos, self.layer, self.width)
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.center_pos = Vector2D(kwargs['center'])
        self.radius = kwargs['radius']

        self.end_pos = Vector2D([self.center_pos.x+self.radius, self.center_pos.y])

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.start_pos = Point(kwargs['start'])
        self.end_pos = Point(kwargs['end'])

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width', 0.15)  # TODO: better variation to get line width

        self.virtual_childs = self._createChildNodes(self.start_pos, self.end_pos, self.layer, self.width)
Example #25
0
    def __init__(self, **kwargs):
        Node.__init__(self)

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')

        self._initPolyPoint(**kwargs)

        self.virtual_childs = self._createChildNodes(self.nodes)
Example #26
0
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.center_pos = Point(kwargs['center'])
        self.radius = kwargs['radius']

        self.end_pos = {'x': self.center_pos.x+self.radius, 'y': self.center_pos.y}

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')
    def __init__(self, name):
        Node.__init__(self)

        self.name = name
        self.description = None
        self.tags = None
        self.attribute = None
        self.maskMargin = None
        self.pasteMargin = None
        self.pasteMarginRatio = None
Example #28
0
    def __init__(self, name):
        Node.__init__(self)

        self.name = name
        self.description = None
        self.tags = None
        self.attribute = None
        self.maskMargin = None
        self.pasteMargin = None
        self.pasteMarginRatio = None
Example #29
0
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.center_pos = Vector2D(kwargs['center'])
        self.radius = kwargs['radius']

        self.end_pos = Vector2D(
            [self.center_pos.x + self.radius, self.center_pos.y])

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')
 def __init__(self, **kwargs):
     Node.__init__(self)
     self.solder_mask_margin = kwargs.get('solder_mask_margin', 0)
     self.minimum_overlap = kwargs.get('minimum_overlap', 0.1)
     self._initPosition(**kwargs)
     self._initSize(**kwargs)
     self._initNumber(**kwargs)
     self._initPasteSettings(**kwargs)
     self._initNumAnchor(**kwargs)
     self._generatePads()
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.reference_arc = geometricArc(geometry=kwargs['reference_arc'])
        self.width = float(kwargs['width'])

        self.number = kwargs.get('number', "")
        self.layers = kwargs['layers']
        self.minimum_overlap = kwargs.get('minimum_overlap', 0.1)

        self.setRoundRadius(**kwargs)
        self.setLimitingLines(**kwargs)
Example #32
0
    def __init__(self, **kwargs):
        Node.__init__(self)

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width', 0.15)

        self._initMirror(**kwargs)

        self._initPolygone(**kwargs)

        self.virtual_childs = self._createChildNodes(self.polygone_line)
Example #33
0
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.type = kwargs['type']
        self.text = kwargs['text']
        self.at = Point(kwargs['at'])
        self.rotation = kwargs.get('rotation', 0)

        self.layer = kwargs['layer']
        self.size = Point(kwargs.get('size', [1, 1]))
        self.thickness = kwargs.get('thickness', 0.15)

        self.hide = kwargs.get('hide', False)
    def __init__(self, **kwargs):
        Node.__init__(self)

        self._initNumber(**kwargs)
        self._initType(**kwargs)
        self._initShape(**kwargs)
        self._initPosition(**kwargs)
        self._initSize(**kwargs)
        self._initOffset(**kwargs)
        self._initDrill(**kwargs)  # requires pad type and offset
        self._initSolderPasteMargin(**kwargs)
        self._initLayers(**kwargs)
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.type = kwargs['type']
        self.text = kwargs['text']
        self.at = Vector2D(kwargs['at'])
        self.rotation = kwargs.get('rotation', 0)

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.size = Vector2D(kwargs.get('size', [1, 1]))
        self.thickness = kwargs.get('thickness', 0.15)

        self.hide = kwargs.get('hide', False)
Example #36
0
    def __init__(self, **kwargs):
        Node.__init__(self)

        self._initNumber(**kwargs)
        self._initType(**kwargs)
        self._initShape(**kwargs)
        self._initPosition(**kwargs)
        self._initSize(**kwargs)
        self._initOffset(**kwargs)
        self._initDrill(**kwargs)  # requires pad type and offset
        self._initSolderPasteMargin(**kwargs)
        self._initLayers(**kwargs)
Example #37
0
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.start_pos = Point(kwargs['start'])
        self.end_pos = Point(kwargs['end'])

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get(
            'width', 0.15)  # TODO: better variation to get line width

        self.virtual_childs = self._createChildNodes(self.start_pos,
                                                     self.end_pos, self.layer,
                                                     self.width)
Example #38
0
    def __init__(self, **kwargs):
        Node.__init__(self)
        if 'geometry' in kwargs:
            geometry = kwargs['geometry']
            geometricLine.__init__(self, geometry.start_pos, geometry.end_pos)
        else:
            geometricLine.__init__(self,
                                   start=Vector2D(kwargs['start']),
                                   end=Vector2D(kwargs['end']))

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width')
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.at = Vector2D(kwargs.get('at', [0, 0]))
        self.size_round_base = kwargs.get('size_round_base', 0.01)
        self.grid_round_base = kwargs.get('grid_round_base', 0.01)

        self.radius_ratio = kwargs.get('radius_ratio', 0)
        self.maximum_radius = kwargs.get('maximum_radius')

        self._initNumber(**kwargs)
        self._initSize(**kwargs)
        self._initThermalVias(**kwargs)
        self._initPaste(**kwargs)
Example #40
0
    def __init__(self, **kwargs):
        Node.__init__(self)
        self._initType(**kwargs)

        self.text = kwargs['text']
        self.at = Vector2D(kwargs['at'])
        self.rotation = kwargs.get('rotation', 0)
        self.mirror = kwargs.get('mirror', False)

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.size = Vector2D(kwargs.get('size', [1, 1]))
        self.thickness = kwargs.get('thickness', 0.15)

        self.hide = kwargs.get('hide', False)
    def __init__(self, name):
        Node.__init__(self)

        self.name = name
        self.description = None
        self.tags = None
        self.attribute = None
        self.clearance = None
        self.maskMargin = None
        self.pasteMargin = None
        self.pasteMarginRatio = None
        self.zoneConnect = None
        self.thermalWidth = None
        self.thermalGap = None
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.start_pos = Point(kwargs['start'])
        self.end_pos = Point(kwargs['end'])

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get('width', 0.15)  # TODO: better variation to get line width

        rect_line = RectLine(**kwargs)
        rect_line._parent = self

        rect_fill = RectFill(**kwargs)
        rect_fill._parent = self

        self.virtual_childs = [rect_line, rect_fill]
Example #43
0
    def calculateBoundingBox(self):
        # TODO: finish implementation
        min_x = min(self.start_pos.x, self._calulateEndPos().x)
        min_y = min(self.start_pos.x, self._calulateEndPos().y)
        max_x = max(self.start_pos.x, self._calulateEndPos().x)
        max_y = max(self.start_pos.x, self._calulateEndPos().y)
        '''
        for angle in range(4):
            float_angle = angle * math.pi/2.

            start_angle = _calculateStartAngle(self)
            end_angle = start_angle + math.radians(self.angle)

            # TODO: +- pi border
            if float_angle < start_angle:
                continue
            if float_angle > end_angle:
                continue

            print("TODO: add angle side: {1}".format(float_angle))
        '''

        return Node.calculateBoundingBox({
            'min': Point((min_x, min_y)),
            'max': Point((max_x, max_y))
        })
    def calculateBoundingBox(self):
        min_x = self.center_pos.x-self.radius
        min_y = self.center_pos.y-self.radius
        max_x = self.center_pos.x+self.radius
        max_y = self.center_pos.y+self.radius

        return Node.calculateBoundingBox({'min': ParseXY(min_x, min_y), 'max': ParseXY(max_x, max_y)})
    def __init__(self, **kwargs):
        Node.__init__(self)
        self.start_pos = Point(kwargs['start'])
        self.end_pos = Point(kwargs['end'])

        self.layer = kwargs.get('layer', 'F.SilkS')
        self.width = kwargs.get(
            'width', 0.15)  # TODO: better variation to get line width

        rect_line = RectLine(**kwargs)
        rect_line._parent = self

        rect_fill = RectFill(**kwargs)
        rect_fill._parent = self

        self.virtual_childs = [rect_line, rect_fill]
Example #46
0
    def calculateBoundingBox(self):
        min_x = self.center_pos.x-self.radius
        min_y = self.center_pos.y-self.radius
        max_x = self.center_pos.x+self.radius
        max_y = self.center_pos.y+self.radius

        return Node.calculateBoundingBox({'min': ParseXY(min_x, min_y), 'max': ParseXY(max_x, max_y)})
    def _getRenderTreeText(self):
        render_text = Node._getRenderTreeText(self)
        render_text += " [start: [x: {sx}, y: {sy}] end: [x: {ex}, y: {ey}]]".format(sx=self.start_pos.x,
                                                                                     sy=self.start_pos.y,
                                                                                     ex=self.end_pos.x,
                                                                                     ey=self.end_pos.y)

        return render_text
    def _getRenderTreeText(self):
        render_text = Node._getRenderTreeText(self)

        render_string = ['start: [x: {sx}, y: {sy}]'.format(sx=self.start_pos.x, sy=self.start_pos.y),
                         'end: [x: {ex}, y: {ey}]'.format(ex=self.end_pos.x, ey=self.end_pos.y)]

        render_text += " [{}]".format(", ".join(render_string))

        return render_text
    def calculateBoundingBox(self):
        min = max = self.getRealPosition(self.nodes[0])

        for n in self.nodes:
            min.x = min([min.x, n.x])
            min.y = min([min.y, n.y])
            max.x = max([max.x, n.x])
            max.y = max([max.y, n.y])

        return Node.calculateBoundingBox({'min': min, 'max': max})
    def calculateBoundingBox(self):
        render_start_pos = self.getRealPosition(self.start_pos)
        render_end_pos = self.getRealPosition(self.end_pos)

        min_x = min([render_start_pos.x, render_end_pos.x])
        min_y = min([render_start_pos.y, render_end_pos.y])
        max_x = max([render_start_pos.x, render_end_pos.x])
        max_y = max([render_start_pos.y, render_end_pos.y])

        return Node.calculateBoundingBox({'min': Vector2D(min_x, min_y), 'max': Vector2D(max_x, max_y)})
    def calculateBoundingBox(self):
        render_start_pos = self.getRealPosition(self.start_pos)
        render_end_pos = self.getRealPosition(self.end_pos)

        min_x = min([render_start_pos.x, render_end_pos.x])
        min_y = min([render_start_pos.y, render_end_pos.y])
        max_x = max([render_start_pos.x, render_end_pos.x])
        max_y = max([render_start_pos.y, render_end_pos.y])

        return Node.calculateBoundingBox({"min": Point(min_x, min_y), "max": Point(max_x, max_y)})
    def calculateBoundingBox(self):
        width = len(self.text)*self.size['x']
        height = self.size['y']

        min_x = self.at['x']-width/2.
        min_y = self.at['y']-height/2.
        max_x = self.at['x']+width/2.
        max_y = self.at['y']+height/2.

        return Node.calculateBoundingBox({'min': Vector2D(min_x, min_y), 'max': Vector2D(max_x, max_y)})
    def _getRenderTreeText(self):
        render_strings = ["fp_line"]
        render_strings.append(self.start_pos.render("(start {x} {y})"))
        render_strings.append(self.end_pos.render("(end {x} {y})"))
        render_strings.append("(layer {layer})".format(layer=self.layer))
        render_strings.append("(width {width})".format(width=self.width))

        render_text = Node._getRenderTreeText(self)
        render_text += " ({})".format(" ".join(render_strings))

        return render_text
    def _getRenderTreeText(self):
        render_strings = ['fp_line']
        render_strings.append(self.start_pos.render('(start {x} {y})'))
        render_strings.append(self.end_pos.render('(end {x} {y})'))
        render_strings.append('(layer {layer})'.format(layer=self.layer))
        render_strings.append('(width {width})'.format(width=self.width))

        render_text = Node._getRenderTreeText(self)
        render_text += ' ({})'.format(' '.join(render_strings))

        return render_text
    def _getRenderTreeText(self):
        render_text = Node._getRenderTreeText(self)

        render_string = ['filename: {filename}'.format(filename=self.filename),
                         'at: {at}'.format(at=self.at.render('(xyz {x} {y} {z})')),
                         'scale: {scale}'.format(scale=self.scale.render('(xyz {x} {y} {z})')),
                         'rotate: {rotate}'.format(rotate=self.rotate.render('(xyz {x} {y} {z})'))]

        render_text += " [{}]".format(", ".join(render_string))

        return render_text
    def _getRenderTreeText(self):
        render_strings = ['fp_arc']
        render_strings.append(self.center_pos.render('(center {x} {y})'))
        render_strings.append(self.start_pos.render('(start {x} {y})'))
        render_strings.append('(angle {angle})'.format(angle=self.angle))
        render_strings.append('(layer {layer})'.format(layer=self.layer))
        render_strings.append('(width {width})'.format(width=self.width))

        render_text = Node._getRenderTreeText(self)
        render_text += ' ({})'.format(' '.join(render_strings))

        return render_text
    def _getRenderTreeText(self):
        render_text = Node._getRenderTreeText(self)

        render_string = ['type: "{}"'.format(self.type),
                         'text: "{}"'.format(self.text),
                         'at: {}'.format(self.at.render('(at {x} {y})')),
                         'layer: {}'.format(self.layer),
                         'size: {}'.format(self.size.render('(size {x} {y})')),
                         'thickness: {}'.format(self.thickness)]

        render_text += " [{}]".format(", ".join(render_string))

        return render_text
Example #58
0
    def _getRenderTreeText(self):
        render_strings = ['pad']
        render_strings.append(lispString(self.number))
        render_strings.append(lispString(self.type))
        render_strings.append(lispString(self.shape))
        render_strings.append(self.at.render('(at {x} {y})'))
        render_strings.append(self.size.render('(size {x} {y})'))
        render_strings.append('(drill {})'.format(self.drill))
        render_strings.append('(layers {})'.format(' '.join(self.layers)))

        render_text = Node._getRenderTreeText(self)
        render_text += '({})'.format(' '.join(render_strings))

        return render_text