本文整理汇总了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
示例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)
示例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")
示例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')
示例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()
示例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)
示例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)
示例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')
示例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)
示例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')
示例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)
示例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)
示例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')
示例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
示例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)