Example #1
0
    def __init__(self, coord, layer_pair, size, drill, board=None):
        self._via = pcbnew.VIA(board and board.native_obj)
        self._via.SetViaType(via_type)
        self._via.SetWidth(int(size * units.DEFAULT_UNIT_IUS))
        coord_point = Point.build_from(coord)
        self._via.SetEnd(coord_point.native_obj)
        self._via.SetStart(coord_point.native_obj)
        if board:
            self._via.SetLayerPair(board.get_layer(layer_pair[0]), board.get_layer(layer_pair[1]))
        else:
            self._via.SetLayerPair(layer.get_std_layer(layer_pair[0]), layer.get_std_layer(layer_pair[1]))

        self._via.SetDrill(int(drill * units.DEFAULT_UNIT_IUS))
Example #2
0
    def __init__(self, coord, layer_pair, diameter, drill, board=None):
        self._obj = pcbnew.VIA(board and board.native_obj)
        self.diameter = diameter
        coord_point = Point.build_from(coord)
        self._obj.SetEnd(coord_point.native_obj)
        self._obj.SetStart(coord_point.native_obj)
        if board:
            self._obj.SetLayerPair(board.get_layer(layer_pair[0]),
                                   board.get_layer(layer_pair[1]))
        else:
            self._obj.SetLayerPair(layer.get_std_layer(layer_pair[0]),
                                   layer.get_std_layer(layer_pair[1]))

        self.drill = drill
Example #3
0
    def __init__(self, coord, layer_pair, size, drill, board=None):
        self._via = pcbnew.VIA(board and board.native_obj)
        self._via.SetWidth(int(size * units.DEFAULT_UNIT_IUS))
        coord_point = Point.build_from(coord)
        self._via.SetEnd(coord_point.native_obj)
        self._via.SetStart(coord_point.native_obj)
        if board:
            self._via.SetLayerPair(board.get_layer(layer_pair[0]),
                                   board.get_layer(layer_pair[1]))
        else:
            self._via.SetLayerPair(layer.get_std_layer(layer_pair[0]),
                                   layer.get_std_layer(layer_pair[1]))

        self._via.SetDrill(int(drill * units.DEFAULT_UNIT_IUS))