当前位置: 首页>>代码示例>>Python>>正文


Python Node.__init__方法代码示例

本文整理汇总了Python中KicadModTree.nodes.Node.Node.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Node.__init__方法的具体用法?Python Node.__init__怎么用?Python Node.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KicadModTree.nodes.Node.Node的用法示例。


在下文中一共展示了Node.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    def __init__(self, name):
        Node.__init__(self)

        self.name = name
        self.description = None
        self.tags = None
        self.attribute = None
开发者ID:SchrodingersGat,项目名称:kicad-footprint-generator,代码行数:9,代码来源:Footprint.py

示例2: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    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)
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:37,代码来源:Pad.py

示例3: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    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")
开发者ID:SchrodingersGat,项目名称:kicad-footprint-generator,代码行数:9,代码来源:Line.py

示例4: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    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')
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:9,代码来源:Line.py

示例5: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    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()
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:33,代码来源:StandardBox.py

示例6: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
 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)
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:10,代码来源:PadArray.py

示例7: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    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)
开发者ID:andrewjrobinson,项目名称:kicad-footprint-generator,代码行数:10,代码来源:PolygoneLine.py

示例8: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    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')
开发者ID:SchrodingersGat,项目名称:kicad-footprint-generator,代码行数:10,代码来源:Arc.py

示例9: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    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)
开发者ID:SchrodingersGat,项目名称:kicad-footprint-generator,代码行数:11,代码来源:RectFill.py

示例10: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    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')
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:11,代码来源:Circle.py

示例11: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    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)
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:11,代码来源:PolygoneLine.py

示例12: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    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)
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:11,代码来源:RectFill.py

示例13: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    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')
开发者ID:andrewjrobinson,项目名称:kicad-footprint-generator,代码行数:11,代码来源:Circle.py

示例14: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    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
开发者ID:poeschlr,项目名称:kicad-footprint-generator,代码行数:12,代码来源:Footprint.py

示例15: __init__

# 需要导入模块: from KicadModTree.nodes.Node import Node [as 别名]
# 或者: from KicadModTree.nodes.Node.Node import __init__ [as 别名]
    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)
开发者ID:SchrodingersGat,项目名称:kicad-footprint-generator,代码行数:14,代码来源:Pad.py


注:本文中的KicadModTree.nodes.Node.Node.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。