Add typing: magic methods
This commit is contained in:
parent
755d8be998
commit
11340448fa
|
@ -119,7 +119,7 @@ class NutHole:
|
||||||
"M64": (95, 51),
|
"M64": (95, 51),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, boxes, settings):
|
def __init__(self, boxes, settings) -> None:
|
||||||
self.boxes = boxes
|
self.boxes = boxes
|
||||||
self.ctx = boxes.ctx
|
self.ctx = boxes.ctx
|
||||||
self.settings = settings
|
self.settings = settings
|
||||||
|
@ -181,7 +181,7 @@ class ArgparseEdgeType:
|
||||||
names = edges.getDescriptions()
|
names = edges.getDescriptions()
|
||||||
edges: List[str] = []
|
edges: List[str] = []
|
||||||
|
|
||||||
def __init__(self, edges: Optional[str] = None):
|
def __init__(self, edges: Optional[str] = None) -> None:
|
||||||
if edges:
|
if edges:
|
||||||
self.edges = list(edges)
|
self.edges = list(edges)
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ class Boxes:
|
||||||
|
|
||||||
description = "" # Markdown syntax is supported
|
description = "" # Markdown syntax is supported
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
self.formats = formats.Formats()
|
self.formats = formats.Formats()
|
||||||
self.ctx = None
|
self.ctx = None
|
||||||
description = self.__doc__
|
description = self.__doc__
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Surface:
|
||||||
scale = 1.0
|
scale = 1.0
|
||||||
invert_y = False
|
invert_y = False
|
||||||
|
|
||||||
def __init__(self, fname):
|
def __init__(self, fname) -> None:
|
||||||
self._fname = fname
|
self._fname = fname
|
||||||
self.parts = []
|
self.parts = []
|
||||||
self._p = self.new_part("default")
|
self._p = self.new_part("default")
|
||||||
|
@ -93,7 +93,7 @@ class Surface:
|
||||||
|
|
||||||
|
|
||||||
class Part:
|
class Part:
|
||||||
def __init__(self, name):
|
def __init__(self, name) -> None:
|
||||||
self.pathes = []
|
self.pathes = []
|
||||||
self.path = []
|
self.path = []
|
||||||
|
|
||||||
|
@ -140,11 +140,11 @@ class Part:
|
||||||
|
|
||||||
|
|
||||||
class Path:
|
class Path:
|
||||||
def __init__(self, path, params):
|
def __init__(self, path, params) -> None:
|
||||||
self.path = path
|
self.path = path
|
||||||
self.params = params
|
self.params = params
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self) -> str:
|
||||||
l = len(self.path)
|
l = len(self.path)
|
||||||
# x1,y1 = self.path[0][1:3]
|
# x1,y1 = self.path[0][1:3]
|
||||||
if l>0:
|
if l>0:
|
||||||
|
@ -211,7 +211,7 @@ class Path:
|
||||||
self.path = [p for n, p in enumerate(self.path) if p != self.path[n-1]]
|
self.path = [p for n, p in enumerate(self.path) if p != self.path[n-1]]
|
||||||
|
|
||||||
class Context:
|
class Context:
|
||||||
def __init__(self, surface, *al, **ad):
|
def __init__(self, surface, *al, **ad) -> None:
|
||||||
self._renderer = self._dwg = surface
|
self._renderer = self._dwg = surface
|
||||||
|
|
||||||
self._bounds = Extents()
|
self._bounds = Extents()
|
||||||
|
|
|
@ -116,7 +116,7 @@ class BoltPolicy(object):
|
||||||
class Bolts(BoltPolicy):
|
class Bolts(BoltPolicy):
|
||||||
"""Distribute a fixed number of bolts evenly"""
|
"""Distribute a fixed number of bolts evenly"""
|
||||||
|
|
||||||
def __init__(self, bolts=1):
|
def __init__(self, bolts=1) -> None:
|
||||||
self.bolts = bolts
|
self.bolts = bolts
|
||||||
|
|
||||||
def numFingers(self, numFingers):
|
def numFingers(self, numFingers):
|
||||||
|
@ -211,7 +211,7 @@ class Settings(object):
|
||||||
choices=choices,
|
choices=choices,
|
||||||
help=descriptions.get(name))
|
help=descriptions.get(name))
|
||||||
|
|
||||||
def __init__(self, thickness, relative=True, **kw):
|
def __init__(self, thickness, relative=True, **kw) -> None:
|
||||||
self.values = {}
|
self.values = {}
|
||||||
for name, value in self.absolute_params.items():
|
for name, value in self.absolute_params.items():
|
||||||
if isinstance(value, tuple):
|
if isinstance(value, tuple):
|
||||||
|
@ -294,7 +294,7 @@ class BaseEdge(object):
|
||||||
char: Optional[str] = None
|
char: Optional[str] = None
|
||||||
description = "Abstract Edge Class"
|
description = "Abstract Edge Class"
|
||||||
|
|
||||||
def __init__(self, boxes, settings):
|
def __init__(self, boxes, settings) -> None:
|
||||||
self.boxes = boxes
|
self.boxes = boxes
|
||||||
self.ctx = boxes.ctx
|
self.ctx = boxes.ctx
|
||||||
self.settings = settings
|
self.settings = settings
|
||||||
|
@ -727,7 +727,7 @@ class CompoundEdge(BaseEdge):
|
||||||
"""Edge composed of multiple different Edges"""
|
"""Edge composed of multiple different Edges"""
|
||||||
description = "Compound Edge"
|
description = "Compound Edge"
|
||||||
|
|
||||||
def __init__(self, boxes, types, lengths):
|
def __init__(self, boxes, types, lengths) -> None:
|
||||||
super(CompoundEdge, self).__init__(boxes, None)
|
super(CompoundEdge, self).__init__(boxes, None)
|
||||||
|
|
||||||
self.types = [self.edges.get(edge, edge) for edge in types]
|
self.types = [self.edges.get(edge, edge) for edge in types]
|
||||||
|
@ -763,7 +763,7 @@ class Slot(BaseEdge):
|
||||||
|
|
||||||
description = "Slot"
|
description = "Slot"
|
||||||
|
|
||||||
def __init__(self, boxes, depth):
|
def __init__(self, boxes, depth) -> None:
|
||||||
super(Slot, self).__init__(boxes, None)
|
super(Slot, self).__init__(boxes, None)
|
||||||
|
|
||||||
self.depth = depth
|
self.depth = depth
|
||||||
|
@ -785,7 +785,7 @@ class SlottedEdge(BaseEdge):
|
||||||
"""Edge with multiple slots"""
|
"""Edge with multiple slots"""
|
||||||
description = "Straight Edge with slots"
|
description = "Straight Edge with slots"
|
||||||
|
|
||||||
def __init__(self, boxes, sections, edge="e", slots=0):
|
def __init__(self, boxes, sections, edge="e", slots=0) -> None:
|
||||||
super(SlottedEdge, self).__init__(boxes, Settings(boxes.thickness))
|
super(SlottedEdge, self).__init__(boxes, Settings(boxes.thickness))
|
||||||
|
|
||||||
self.edge = self.edges.get(edge, edge)
|
self.edge = self.edges.get(edge, edge)
|
||||||
|
@ -1019,7 +1019,7 @@ class FingerJointEdgeCounterPart(FingerJointEdge):
|
||||||
class FingerHoles(FingerJointBase):
|
class FingerHoles(FingerJointBase):
|
||||||
"""Hole matching a finger joint edge"""
|
"""Hole matching a finger joint edge"""
|
||||||
|
|
||||||
def __init__(self, boxes, settings):
|
def __init__(self, boxes, settings) -> None:
|
||||||
self.boxes = boxes
|
self.boxes = boxes
|
||||||
self.ctx = boxes.ctx
|
self.ctx = boxes.ctx
|
||||||
self.settings = settings
|
self.settings = settings
|
||||||
|
@ -1067,7 +1067,7 @@ class FingerHoleEdge(BaseEdge):
|
||||||
char = 'h'
|
char = 'h'
|
||||||
description = "Edge (parallel Finger Joint Holes)"
|
description = "Edge (parallel Finger Joint Holes)"
|
||||||
|
|
||||||
def __init__(self, boxes, fingerHoles=None, **kw):
|
def __init__(self, boxes, fingerHoles=None, **kw) -> None:
|
||||||
settings = None
|
settings = None
|
||||||
if isinstance(fingerHoles, Settings):
|
if isinstance(fingerHoles, Settings):
|
||||||
settings = fingerHoles
|
settings = fingerHoles
|
||||||
|
@ -1106,7 +1106,7 @@ class CrossingFingerHoleEdge(Edge):
|
||||||
description = "Edge (orthogonal Finger Joint Holes)"
|
description = "Edge (orthogonal Finger Joint Holes)"
|
||||||
char = '|'
|
char = '|'
|
||||||
|
|
||||||
def __init__(self, boxes, height, fingerHoles=None, **kw):
|
def __init__(self, boxes, height, fingerHoles=None, **kw) -> None:
|
||||||
super(CrossingFingerHoleEdge, self).__init__(boxes, None, **kw)
|
super(CrossingFingerHoleEdge, self).__init__(boxes, None, **kw)
|
||||||
|
|
||||||
self.fingerHoles = fingerHoles or boxes.fingerHolesAt
|
self.fingerHoles = fingerHoles or boxes.fingerHolesAt
|
||||||
|
@ -1173,7 +1173,7 @@ class StackableBaseEdge(BaseEdge):
|
||||||
description = "Abstract Stackable class"
|
description = "Abstract Stackable class"
|
||||||
bottom = True
|
bottom = True
|
||||||
|
|
||||||
def __init__(self, boxes, settings, fingerjointsettings):
|
def __init__(self, boxes, settings, fingerjointsettings) -> None:
|
||||||
super().__init__(boxes, settings)
|
super().__init__(boxes, settings)
|
||||||
|
|
||||||
self.fingerjointsettings = fingerjointsettings
|
self.fingerjointsettings = fingerjointsettings
|
||||||
|
@ -1311,7 +1311,7 @@ class Hinge(BaseEdge):
|
||||||
char = 'i'
|
char = 'i'
|
||||||
description = "Straight edge with hinge eye"
|
description = "Straight edge with hinge eye"
|
||||||
|
|
||||||
def __init__(self, boxes, settings=None, layout=1):
|
def __init__(self, boxes, settings=None, layout=1) -> None:
|
||||||
super(Hinge, self).__init__(boxes, settings)
|
super(Hinge, self).__init__(boxes, settings)
|
||||||
|
|
||||||
if not (0 < layout <= 3):
|
if not (0 < layout <= 3):
|
||||||
|
@ -1400,7 +1400,7 @@ class HingePin(BaseEdge):
|
||||||
char = 'I'
|
char = 'I'
|
||||||
description = "Edge with hinge pin"
|
description = "Edge with hinge pin"
|
||||||
|
|
||||||
def __init__(self, boxes, settings=None, layout=1):
|
def __init__(self, boxes, settings=None, layout=1) -> None:
|
||||||
super(HingePin, self).__init__(boxes, settings)
|
super(HingePin, self).__init__(boxes, settings)
|
||||||
|
|
||||||
if not (0 < layout <= 3):
|
if not (0 < layout <= 3):
|
||||||
|
@ -1576,7 +1576,7 @@ class ChestHinge(BaseEdge):
|
||||||
|
|
||||||
char = "o"
|
char = "o"
|
||||||
|
|
||||||
def __init__(self, boxes, settings=None, reversed=False):
|
def __init__(self, boxes, settings=None, reversed=False) -> None:
|
||||||
super(ChestHinge, self).__init__(boxes, settings)
|
super(ChestHinge, self).__init__(boxes, settings)
|
||||||
|
|
||||||
self.reversed = reversed
|
self.reversed = reversed
|
||||||
|
@ -1632,7 +1632,7 @@ class ChestHingeTop(ChestHinge):
|
||||||
|
|
||||||
char = "p"
|
char = "p"
|
||||||
|
|
||||||
def __init__(self, boxes, settings=None, reversed=False):
|
def __init__(self, boxes, settings=None, reversed=False) -> None:
|
||||||
super(ChestHingeTop, self).__init__(boxes, settings)
|
super(ChestHingeTop, self).__init__(boxes, settings)
|
||||||
|
|
||||||
self.reversed = reversed
|
self.reversed = reversed
|
||||||
|
@ -1764,7 +1764,7 @@ class CabinetHingeEdge(BaseEdge):
|
||||||
char = "u"
|
char = "u"
|
||||||
description = "Edge with cabinet hinges"
|
description = "Edge with cabinet hinges"
|
||||||
|
|
||||||
def __init__(self, boxes, settings=None, top=False, angled=False):
|
def __init__(self, boxes, settings=None, top=False, angled=False) -> None:
|
||||||
super(CabinetHingeEdge, self).__init__(boxes, settings)
|
super(CabinetHingeEdge, self).__init__(boxes, settings)
|
||||||
self.top = top
|
self.top = top
|
||||||
self.angled = angled
|
self.angled = angled
|
||||||
|
@ -2433,7 +2433,7 @@ class RackEdge(BaseEdge):
|
||||||
|
|
||||||
description = "Rack (and pinion) Edge"
|
description = "Rack (and pinion) Edge"
|
||||||
|
|
||||||
def __init__(self, boxes, settings):
|
def __init__(self, boxes, settings) -> None:
|
||||||
super(RackEdge, self).__init__(boxes, settings)
|
super(RackEdge, self).__init__(boxes, settings)
|
||||||
self.gear = gears.Gears(boxes)
|
self.gear = gears.Gears(boxes)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class Extents:
|
class Extents:
|
||||||
__slots__ = "xmin ymin xmax ymax".split()
|
__slots__ = "xmin ymin xmax ymax".split()
|
||||||
|
|
||||||
def __init__(self,xmin=float('inf'),ymin=float('inf'),xmax=float('-inf'),ymax=float('-inf')):
|
def __init__(self,xmin=float('inf'),ymin=float('inf'),xmax=float('-inf'),ymax=float('-inf')) -> None:
|
||||||
self.xmin = xmin
|
self.xmin = xmin
|
||||||
self.ymin = ymin
|
self.ymin = ymin
|
||||||
self.xmax = xmax
|
self.xmax = xmax
|
||||||
|
@ -40,5 +40,5 @@ class Extents:
|
||||||
width = property(get_width)
|
width = property(get_width)
|
||||||
height = property(get_height)
|
height = property(get_height)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self) -> str:
|
||||||
return f'Extents ({self.xmin},{self.ymin})-({self.xmax},{self.ymax})'
|
return f'Extents ({self.xmin},{self.ymin})-({self.xmax},{self.ymax})'
|
||||||
|
|
|
@ -53,7 +53,7 @@ class Formats:
|
||||||
# "" : [('Content-type', '')],
|
# "" : [('Content-type', '')],
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
for cmd in self.pstoedit_candidates:
|
for cmd in self.pstoedit_candidates:
|
||||||
self.pstoedit = shutil.which(cmd)
|
self.pstoedit = shutil.which(cmd)
|
||||||
if self.pstoedit:
|
if self.pstoedit:
|
||||||
|
|
|
@ -258,7 +258,7 @@ class OptionParser(argparse.ArgumentParser):
|
||||||
|
|
||||||
class Gears():
|
class Gears():
|
||||||
|
|
||||||
def __init__(self, boxes, **kw):
|
def __init__(self, boxes, **kw) -> None:
|
||||||
# an alternate way to get debug info:
|
# an alternate way to get debug info:
|
||||||
# could use inkex.debug(string) instead...
|
# could use inkex.debug(string) instead...
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -8,7 +8,7 @@ ui_groups_by_name = {}
|
||||||
|
|
||||||
class UIGroup:
|
class UIGroup:
|
||||||
|
|
||||||
def __init__(self, name, title=None, description="", image=""):
|
def __init__(self, name, title=None, description="", image="") -> None:
|
||||||
self.name = name
|
self.name = name
|
||||||
self.title = title or name
|
self.title = title or name
|
||||||
self.description = description
|
self.description = description
|
||||||
|
|
|
@ -21,7 +21,7 @@ class SlatwallXXX(Boxes): # Change class name!
|
||||||
|
|
||||||
ui_group = "SlatWall"
|
ui_group = "SlatWall"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
|
|
|
@ -21,7 +21,7 @@ class BOX(Boxes): # Change class name!
|
||||||
|
|
||||||
ui_group = "Unstable" # see ./__init__.py for names
|
ui_group = "Unstable" # see ./__init__.py for names
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
# Uncomment the settings for the edge types you use
|
# Uncomment the settings for the edge types you use
|
||||||
|
|
|
@ -23,7 +23,7 @@ class ABox(Boxes):
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.buildArgParser("x", "y", "h", "outside", "bottom_edge")
|
self.buildArgParser("x", "y", "h", "outside", "bottom_edge")
|
||||||
|
|
|
@ -127,7 +127,7 @@ protruding underneath.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1.0)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1.0)
|
||||||
|
|
||||||
|
@ -780,7 +780,7 @@ class MoorBoxSideEdge(edges.BaseEdge):
|
||||||
Edge for the sides of the moor tiles box
|
Edge for the sides of the moor tiles box
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, boxes, corner_length, corner_height, lower_corner):
|
def __init__(self, boxes, corner_length, corner_height, lower_corner) -> None:
|
||||||
super().__init__(boxes, None)
|
super().__init__(boxes, None)
|
||||||
self.corner_height = corner_height
|
self.corner_height = corner_height
|
||||||
self.lower_corner = lower_corner
|
self.lower_corner = lower_corner
|
||||||
|
@ -811,7 +811,7 @@ class MoorBoxHoleEdge(edges.BaseEdge):
|
||||||
Edge which does the notches for the moor tiles box
|
Edge which does the notches for the moor tiles box
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, boxes, height, corner_height, lower_corner):
|
def __init__(self, boxes, height, corner_height, lower_corner) -> None:
|
||||||
super().__init__(boxes, None)
|
super().__init__(boxes, None)
|
||||||
self.height = height
|
self.height = height
|
||||||
self.corner_height = corner_height
|
self.corner_height = corner_height
|
||||||
|
@ -863,7 +863,7 @@ class BedHeadEdge(edges.BaseEdge):
|
||||||
Edge which does the head side of the Agricola player box
|
Edge which does the head side of the Agricola player box
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, boxes, hole_depth):
|
def __init__(self, boxes, hole_depth) -> None:
|
||||||
super().__init__(boxes, None)
|
super().__init__(boxes, None)
|
||||||
self.hole_depth = hole_depth
|
self.hole_depth = hole_depth
|
||||||
|
|
||||||
|
@ -894,7 +894,7 @@ class Bed2SidesEdge(edges.BaseEdge):
|
||||||
The next edge should be a NoopEdge
|
The next edge should be a NoopEdge
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, boxes, bed_length, full_head_length, full_foot_height):
|
def __init__(self, boxes, bed_length, full_head_length, full_foot_height) -> None:
|
||||||
super().__init__(boxes, None)
|
super().__init__(boxes, None)
|
||||||
self.bed_length = bed_length
|
self.bed_length = bed_length
|
||||||
self.full_head_length = full_head_length
|
self.full_head_length = full_head_length
|
||||||
|
@ -926,7 +926,7 @@ class NoopEdge(edges.BaseEdge):
|
||||||
Edge which does nothing, not even turn or move.
|
Edge which does nothing, not even turn or move.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, boxes):
|
def __init__(self, boxes) -> None:
|
||||||
super().__init__(boxes, None)
|
super().__init__(boxes, None)
|
||||||
|
|
||||||
def __call__(self, length, **kw):
|
def __call__(self, length, **kw):
|
||||||
|
|
|
@ -21,7 +21,7 @@ class AllEdges(Boxes):
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class AngledBox(Boxes):
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.buildArgParser("x", "y", "h", "outside", "bottom_edge")
|
self.buildArgParser("x", "y", "h", "outside", "bottom_edge")
|
||||||
|
|
|
@ -21,7 +21,7 @@ class AngledCutJig(Boxes): # Change class name!
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1.)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1.)
|
||||||
|
|
|
@ -19,7 +19,7 @@ from boxes import *
|
||||||
class Arcade(Boxes):
|
class Arcade(Boxes):
|
||||||
"""Desktop Arcade Machine"""
|
"""Desktop Arcade Machine"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
|
|
|
@ -11,7 +11,7 @@ class Atreus21(Boxes, Keyboard):
|
||||||
half_btn = btn_size / 2
|
half_btn = btn_size / 2
|
||||||
border = 6
|
border = 6
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.add_common_keyboard_parameters(
|
self.add_common_keyboard_parameters(
|
||||||
# By default, columns from Atreus 21
|
# By default, columns from Atreus 21
|
||||||
|
|
|
@ -30,7 +30,7 @@ plate. The width of the "brim" can also be adjusted with the **edge_width**
|
||||||
See ClosedBox for variant without a base.
|
See ClosedBox for variant without a base.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.buildArgParser("x", "y", "h", "outside")
|
self.buildArgParser("x", "y", "h", "outside")
|
||||||
|
|
|
@ -22,7 +22,7 @@ class BayonetBox(Boxes):
|
||||||
description = """Glue together - all outside rings to the bottom, all inside rings to the top."""
|
description = """Glue together - all outside rings to the bottom, all inside rings to the top."""
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
|
|
|
@ -48,7 +48,7 @@ class BinTray(Boxes):
|
||||||
|
|
||||||
ui_group = "Shelf"
|
ui_group = "Shelf"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.buildArgParser("sx", "sy", "h", "outside", "hole_dD")
|
self.buildArgParser("sx", "sy", "h", "outside", "hole_dD")
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5)
|
||||||
|
|
|
@ -21,7 +21,7 @@ class BirdHouse(Boxes):
|
||||||
|
|
||||||
ui_group = "Unstable" # "Misc"
|
ui_group = "Unstable" # "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, finger=10.0,space=10.0)
|
self.addSettingsArgs(edges.FingerJointSettings, finger=10.0,space=10.0)
|
||||||
|
|
|
@ -26,7 +26,7 @@ Without the "double" option the stand is a bit more narrow.
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
|
|
|
@ -22,7 +22,7 @@ class BottleTag(Boxes):
|
||||||
|
|
||||||
ui_group = "Misc" # see ./__init__.py for names
|
ui_group = "Misc" # see ./__init__.py for names
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.buildArgParser()
|
self.buildArgParser()
|
||||||
|
|
|
@ -93,7 +93,7 @@ class BreadBox(Boxes):
|
||||||
self.polyline(0, 90, h, 90, l, 90, h, 90)
|
self.polyline(0, 90, h, 90, l, 90, h, 90)
|
||||||
self.move(l, h, move)
|
self.move(l, h, move)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5)
|
||||||
|
|
|
@ -34,7 +34,7 @@ See also LBeam that can serve as compact BurnTest and FlexTest for testing flex
|
||||||
|
|
||||||
ui_group = "Part"
|
ui_group = "Part"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
|
|
|
@ -89,7 +89,7 @@ for canned tomatoes:
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, finger=2.0, space=2.0, surroundingspaces=0.0)
|
self.addSettingsArgs(edges.FingerJointSettings, finger=2.0, space=2.0, surroundingspaces=0.0)
|
||||||
|
|
|
@ -76,7 +76,7 @@ Details of the lid and rails
|
||||||
Whole box (early version still missing grip rail on the lid):
|
Whole box (early version still missing grip rail on the lid):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.buildArgParser(h=30)
|
self.buildArgParser(h=30)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class CardHolder(Boxes):
|
||||||
|
|
||||||
ui_group = "Shelf"
|
ui_group = "Shelf"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.GroovedSettings)
|
self.addSettingsArgs(edges.GroovedSettings)
|
||||||
|
|
|
@ -24,7 +24,7 @@ class Castle(Boxes):
|
||||||
with towers and gates and walls that can be attached in multiple configurations."""
|
with towers and gates and walls that can be attached in multiple configurations."""
|
||||||
ui_group = "Unstable"
|
ui_group = "Unstable"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ plate.
|
||||||
|
|
||||||
See BasedBox for variant with a base."""
|
See BasedBox for variant with a base."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.buildArgParser("x", "y", "h", "outside")
|
self.buildArgParser("x", "y", "h", "outside")
|
||||||
|
|
|
@ -30,7 +30,7 @@ class CoffeeCapsuleHolder(Boxes):
|
||||||
You can store your coffee capsule near your espresso machine with this. It works both vertically, or upside down under a shelf.
|
You can store your coffee capsule near your espresso machine with this. It works both vertically, or upside down under a shelf.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
"--columns",
|
"--columns",
|
||||||
|
|
|
@ -41,7 +41,7 @@ class CoinDisplay(Boxes):
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
|
|
|
@ -21,7 +21,7 @@ class ConcaveKnob(Boxes):
|
||||||
|
|
||||||
ui_group = "Part"
|
ui_group = "Part"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
# Add non default cli params if needed (see argparse std lib)
|
# Add non default cli params if needed (see argparse std lib)
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Console(Boxes):
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=.5)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=.5)
|
||||||
|
|
|
@ -51,7 +51,7 @@ The latches at the back wall lock in place when closed. To open them they need t
|
||||||
To remove the panel you have to press in the four tabs at the side. It is easiest to push them in and then pull the panel up a little bit so the tabs stay in.
|
To remove the panel you have to press in the four tabs at the side. It is easiest to push them in and then pull the panel up a little bit so the tabs stay in.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=.5)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=.5)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class DiceBox(Boxes):
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(
|
self.addSettingsArgs(
|
||||||
edges.FingerJointSettings,
|
edges.FingerJointSettings,
|
||||||
|
|
|
@ -19,7 +19,7 @@ from boxes import *
|
||||||
|
|
||||||
class DinRailEdge(edges.FingerHoleEdge):
|
class DinRailEdge(edges.FingerHoleEdge):
|
||||||
|
|
||||||
def __init__(self, boxes, settings, width=35.0, offset=0.0):
|
def __init__(self, boxes, settings, width=35.0, offset=0.0) -> None:
|
||||||
super().__init__(boxes, settings)
|
super().__init__(boxes, settings)
|
||||||
self.width = width
|
self.width = width
|
||||||
self.offset = offset
|
self.offset = offset
|
||||||
|
@ -62,7 +62,7 @@ class DinRailBox(Boxes):
|
||||||
|
|
||||||
self.move(tw, th, move)
|
self.move(tw, th, move)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=.8)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=.8)
|
||||||
|
|
|
@ -78,7 +78,7 @@ class DiscRack(Boxes):
|
||||||
|
|
||||||
ui_group = "Shelf"
|
ui_group = "Shelf"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.buildArgParser(sx="20*10")
|
self.buildArgParser(sx="20*10")
|
||||||
|
|
|
@ -41,7 +41,7 @@ Please add mounting holes yourself."""
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Display(Boxes):
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.buildArgParser(x=150., h=200.0)
|
self.buildArgParser(x=150., h=200.0)
|
||||||
|
|
|
@ -23,7 +23,7 @@ class DisplayCase(Boxes):
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.buildArgParser("x", "y", "h", "outside")
|
self.buildArgParser("x", "y", "h", "outside")
|
||||||
|
|
|
@ -21,7 +21,7 @@ class DisplayShelf(Boxes): # change class name here and below
|
||||||
|
|
||||||
ui_group = "Shelf"
|
ui_group = "Shelf"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
|
|
|
@ -88,7 +88,7 @@ You will likely need to cut each of the dividers you want multiple times.
|
||||||
|
|
||||||
ui_group = "Tray"
|
ui_group = "Tray"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.addSettingsArgs(edges.HandleEdgeSettings)
|
self.addSettingsArgs(edges.HandleEdgeSettings)
|
||||||
|
@ -365,7 +365,7 @@ You will likely need to cut each of the dividers you want multiple times.
|
||||||
|
|
||||||
|
|
||||||
class SlottedEdgeDescriptions:
|
class SlottedEdgeDescriptions:
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
self.descriptions = []
|
self.descriptions = []
|
||||||
|
|
||||||
def add(self, description):
|
def add(self, description):
|
||||||
|
@ -399,13 +399,13 @@ class StraightEdgeDescription:
|
||||||
round_edge_compensation=0,
|
round_edge_compensation=0,
|
||||||
outside_ratio=1,
|
outside_ratio=1,
|
||||||
angle_compensation=0,
|
angle_compensation=0,
|
||||||
):
|
) -> None:
|
||||||
self.asked_length = asked_length
|
self.asked_length = asked_length
|
||||||
self.round_edge_compensation = round_edge_compensation
|
self.round_edge_compensation = round_edge_compensation
|
||||||
self.outside_ratio = outside_ratio
|
self.outside_ratio = outside_ratio
|
||||||
self.angle_compensation = angle_compensation
|
self.angle_compensation = angle_compensation
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self) -> str:
|
||||||
return (
|
return (
|
||||||
"StraightEdgeDescription({0}, round_edge_compensation={1}, angle_compensation={2}, outside_ratio={3})"
|
"StraightEdgeDescription({0}, round_edge_compensation={1}, angle_compensation={2}, outside_ratio={3})"
|
||||||
).format(
|
).format(
|
||||||
|
@ -433,7 +433,7 @@ class StraightEdgeDescription:
|
||||||
|
|
||||||
|
|
||||||
class Memoizer(dict):
|
class Memoizer(dict):
|
||||||
def __init__(self, computation):
|
def __init__(self, computation) -> None:
|
||||||
self.computation = computation
|
self.computation = computation
|
||||||
|
|
||||||
def __missing__(self, key):
|
def __missing__(self, key):
|
||||||
|
@ -447,14 +447,14 @@ class SlotDescription:
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, width, depth=20, angle=0, radius=0, start_radius=None, end_radius=None
|
self, width, depth=20, angle=0, radius=0, start_radius=None, end_radius=None
|
||||||
):
|
) -> None:
|
||||||
self.depth = depth
|
self.depth = depth
|
||||||
self.width = width
|
self.width = width
|
||||||
self.start_radius = radius if start_radius is None else start_radius
|
self.start_radius = radius if start_radius is None else start_radius
|
||||||
self.end_radius = radius if end_radius is None else end_radius
|
self.end_radius = radius if end_radius is None else end_radius
|
||||||
self.angle = angle
|
self.angle = angle
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self) -> str:
|
||||||
return "SlotDescription({0}, depth={1}, angle={2}, start_radius={3}, end_radius={4})".format(
|
return "SlotDescription({0}, depth={1}, angle={2}, start_radius={3}, end_radius={4})".format(
|
||||||
self.width, self.depth, self.angle, self.start_radius, self.end_radius
|
self.width, self.depth, self.angle, self.start_radius, self.end_radius
|
||||||
)
|
)
|
||||||
|
@ -573,7 +573,7 @@ class DividerNotchesEdge(edges.BaseEdge):
|
||||||
|
|
||||||
description = "Edge with multiple notches for easier access to dividers"
|
description = "Edge with multiple notches for easier access to dividers"
|
||||||
|
|
||||||
def __init__(self, boxes, sx):
|
def __init__(self, boxes, sx) -> None:
|
||||||
|
|
||||||
super().__init__(boxes, None)
|
super().__init__(boxes, None)
|
||||||
|
|
||||||
|
@ -618,7 +618,7 @@ class DividerSlotsEdge(edges.BaseEdge):
|
||||||
|
|
||||||
description = "Edge with multiple angled rounded slots for dividers"
|
description = "Edge with multiple angled rounded slots for dividers"
|
||||||
|
|
||||||
def __init__(self, boxes, descriptions):
|
def __init__(self, boxes, descriptions) -> None:
|
||||||
|
|
||||||
super().__init__(boxes, None)
|
super().__init__(boxes, None)
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ class DoubleFlexDoorBox(boxes.Boxes):
|
||||||
|
|
||||||
ui_group = "FlexBox"
|
ui_group = "FlexBox"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
boxes.Boxes.__init__(self)
|
boxes.Boxes.__init__(self)
|
||||||
self.addSettingsArgs(boxes.edges.FingerJointSettings)
|
self.addSettingsArgs(boxes.edges.FingerJointSettings)
|
||||||
self.addSettingsArgs(boxes.edges.FlexSettings)
|
self.addSettingsArgs(boxes.edges.FlexSettings)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class DrillBox(_TopEdge):
|
||||||
|
|
||||||
ui_group = "Tray"
|
ui_group = "Tray"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings,
|
self.addSettingsArgs(edges.FingerJointSettings,
|
||||||
|
|
|
@ -38,7 +38,7 @@ Start with putting the slots of the inner walls together. Be especially careful
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.StackableSettings, height=1.0, width=3)
|
self.addSettingsArgs(edges.StackableSettings, height=1.0, width=3)
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Edges(Boxes):
|
||||||
|
|
||||||
webinterface = False
|
webinterface = False
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
def render(self):
|
def render(self):
|
||||||
|
|
|
@ -22,7 +22,7 @@ class ElectronicsBox(Boxes):
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.buildArgParser("x", "y", "h", "outside")
|
self.buildArgParser("x", "y", "h", "outside")
|
||||||
|
|
|
@ -22,7 +22,7 @@ class EuroRackSkiff(Boxes):
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.buildArgParser("h")
|
self.buildArgParser("h")
|
||||||
|
|
|
@ -21,7 +21,7 @@ class FanHole(Boxes):
|
||||||
|
|
||||||
ui_group = "Holes"
|
ui_group = "Holes"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
|
|
|
@ -24,7 +24,7 @@ class FillTest(Boxes): # Change class name!
|
||||||
|
|
||||||
ui_group = "Part"
|
ui_group = "Part"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(fillHolesSettings, fill_pattern="hex")
|
self.addSettingsArgs(fillHolesSettings, fill_pattern="hex")
|
||||||
|
|
|
@ -24,7 +24,7 @@ class FlexBox(boxes.Boxes):
|
||||||
|
|
||||||
ui_group = "FlexBox"
|
ui_group = "FlexBox"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
boxes.Boxes.__init__(self)
|
boxes.Boxes.__init__(self)
|
||||||
self.addSettingsArgs(boxes.edges.FingerJointSettings)
|
self.addSettingsArgs(boxes.edges.FingerJointSettings)
|
||||||
self.addSettingsArgs(boxes.edges.FlexSettings)
|
self.addSettingsArgs(boxes.edges.FlexSettings)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class FlexBox2(Boxes):
|
||||||
|
|
||||||
ui_group = "FlexBox"
|
ui_group = "FlexBox"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.addSettingsArgs(edges.FlexSettings)
|
self.addSettingsArgs(edges.FlexSettings)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class FlexBox3(Boxes):
|
||||||
|
|
||||||
ui_group = "FlexBox"
|
ui_group = "FlexBox"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1)
|
||||||
self.addSettingsArgs(edges.FlexSettings)
|
self.addSettingsArgs(edges.FlexSettings)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class FlexBox4(Boxes):
|
||||||
|
|
||||||
ui_group = "FlexBox"
|
ui_group = "FlexBox"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.addSettingsArgs(edges.FlexSettings)
|
self.addSettingsArgs(edges.FlexSettings)
|
||||||
|
|
|
@ -24,7 +24,7 @@ class FlexBox5(boxes.Boxes):
|
||||||
|
|
||||||
ui_group = "FlexBox"
|
ui_group = "FlexBox"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
boxes.Boxes.__init__(self)
|
boxes.Boxes.__init__(self)
|
||||||
self.addSettingsArgs(boxes.edges.FingerJointSettings)
|
self.addSettingsArgs(boxes.edges.FingerJointSettings)
|
||||||
self.addSettingsArgs(boxes.edges.FlexSettings)
|
self.addSettingsArgs(boxes.edges.FlexSettings)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class FlexTest(Boxes):
|
||||||
|
|
||||||
ui_group = "Part"
|
ui_group = "Part"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FlexSettings)
|
self.addSettingsArgs(edges.FlexSettings)
|
||||||
self.buildArgParser("x", "y")
|
self.buildArgParser("x", "y")
|
||||||
|
|
|
@ -22,7 +22,7 @@ class FlexTest2(Boxes):
|
||||||
|
|
||||||
ui_group = "Part"
|
ui_group = "Part"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.buildArgParser("x", "y")
|
self.buildArgParser("x", "y")
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
|
|
|
@ -20,7 +20,7 @@ from boxes import *
|
||||||
class Folder(Boxes):
|
class Folder(Boxes):
|
||||||
"""Book cover with flex for the spine"""
|
"""Book cover with flex for the spine"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FlexSettings)
|
self.addSettingsArgs(edges.FlexSettings)
|
||||||
self.buildArgParser("x", "y", "h")
|
self.buildArgParser("x", "y", "h")
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Gears(Boxes):
|
||||||
|
|
||||||
ui_group = "Part"
|
ui_group = "Part"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
"--teeth1", action="store", type=int, default=12,
|
"--teeth1", action="store", type=int, default=12,
|
||||||
|
|
|
@ -22,7 +22,7 @@ class GearBox(Boxes):
|
||||||
|
|
||||||
ui_group = "Part"
|
ui_group = "Part"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
|
|
|
@ -25,7 +25,7 @@ class GridfinityBase(Boxes):
|
||||||
|
|
||||||
ui_group = "Tray"
|
ui_group = "Tray"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, space=4, finger=4)
|
self.addSettingsArgs(edges.FingerJointSettings, space=4, finger=4)
|
||||||
self.argparser.add_argument("--x", type=int, default=3, help="number of grids in X direction")
|
self.argparser.add_argument("--x", type=int, default=3, help="number of grids in X direction")
|
||||||
|
|
|
@ -35,7 +35,7 @@ and many more...
|
||||||
"""
|
"""
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, finger=2.0,space=2.0)
|
self.addSettingsArgs(edges.FingerJointSettings, finger=2.0,space=2.0)
|
||||||
|
|
|
@ -21,7 +21,7 @@ class HeartBox(Boxes):
|
||||||
|
|
||||||
ui_group = "FlexBox"
|
ui_group = "FlexBox"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, finger=1.0,space=1.0)
|
self.addSettingsArgs(edges.FingerJointSettings, finger=1.0,space=1.0)
|
||||||
|
|
|
@ -28,7 +28,7 @@ Then attach the hinges on the inside of the box and then connect them to lid.
|
||||||
"""
|
"""
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.addSettingsArgs(edges.CabinetHingeSettings)
|
self.addSettingsArgs(edges.CabinetHingeSettings)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class HolePattern(Boxes):
|
||||||
|
|
||||||
ui_group = "Holes"
|
ui_group = "Holes"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(fillHolesSettings, fill_pattern="hex")
|
self.addSettingsArgs(fillHolesSettings, fill_pattern="hex")
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Hook(Boxes):
|
||||||
|
|
||||||
ui_group = "Misc" # see ./__init__.py for names
|
ui_group = "Misc" # see ./__init__.py for names
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class IntegratedHingeBox(Boxes):
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.addSettingsArgs(edges.ChestHingeSettings)
|
self.addSettingsArgs(edges.ChestHingeSettings)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class JigsawPuzzle(Boxes): # change class name here and below
|
||||||
|
|
||||||
webinterface = False # Change to make visible in web interface
|
webinterface = False # Change to make visible in web interface
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.count = 0
|
self.count = 0
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
|
|
|
@ -31,7 +31,7 @@ For plywood this method works well with a very stiff press fit. Aim for needing
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(
|
self.addSettingsArgs(
|
||||||
|
|
|
@ -34,7 +34,7 @@ class Keyboard:
|
||||||
SWITCH_CASE_SIZE = 15.6
|
SWITCH_CASE_SIZE = 15.6
|
||||||
FRAME_CUTOUT = 14
|
FRAME_CUTOUT = 14
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def add_common_keyboard_parameters(
|
def add_common_keyboard_parameters(
|
||||||
|
|
|
@ -18,7 +18,7 @@ class Keypad(Boxes, Keyboard):
|
||||||
box_padding = 10
|
box_padding = 10
|
||||||
triangle = 25.0
|
triangle = 25.0
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
'--h', action='store', type=int, default=30,
|
'--h', action='store', type=int, default=30,
|
||||||
|
|
|
@ -60,7 +60,7 @@ class RoundedTriangle(edges.Edge):
|
||||||
class Lamp(Boxes):
|
class Lamp(Boxes):
|
||||||
webinterface = False
|
webinterface = False
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.buildArgParser(x=220, y=75, h=70)
|
self.buildArgParser(x=220, y=75, h=70)
|
||||||
|
|
|
@ -24,7 +24,7 @@ class LaptopStand(Boxes): # Change class name!
|
||||||
|
|
||||||
ui_group = "Misc" # see ./__init__.py for names
|
ui_group = "Misc" # see ./__init__.py for names
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
|
|
|
@ -27,7 +27,7 @@ parts sliding on each other to reduce friction.
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0)
|
||||||
|
|
|
@ -21,7 +21,7 @@ class LaserHoldfast(Boxes):
|
||||||
|
|
||||||
ui_group = "Part"
|
ui_group = "Part"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.buildArgParser(x=25, h=40)
|
self.buildArgParser(x=25, h=40)
|
||||||
|
|
|
@ -21,7 +21,7 @@ class LBeam(Boxes):
|
||||||
|
|
||||||
ui_group = "Part"
|
ui_group = "Part"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.buildArgParser("x", "y", "h", "outside")
|
self.buildArgParser("x", "y", "h", "outside")
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
|
|
|
@ -20,7 +20,7 @@ from boxes.lids import _TopEdge
|
||||||
class MagazineFile(Boxes):
|
class MagazineFile(Boxes):
|
||||||
"""Open magazine file"""
|
"""Open magazine file"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.buildArgParser(x=100, y=200, h=300, hi=0, outside=False)
|
self.buildArgParser(x=100, y=200, h=300, hi=0, outside=False)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
|
|
|
@ -27,7 +27,7 @@ To allow powering by laptop power supply: flip switch, Lenovo round socket (or a
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
|
|
|
@ -23,7 +23,7 @@ class SBCMicroRack(Boxes):
|
||||||
webinterface = True
|
webinterface = True
|
||||||
ui_group = "Shelf" # see ./__init__.py for names
|
ui_group = "Shelf" # see ./__init__.py for names
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
|
|
|
@ -21,7 +21,7 @@ class NemaMount(Boxes):
|
||||||
|
|
||||||
ui_group = "Part"
|
ui_group = "Part"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
|
|
|
@ -21,7 +21,7 @@ class NemaPattern(Boxes):
|
||||||
|
|
||||||
ui_group = "Holes"
|
ui_group = "Holes"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
|
|
|
@ -57,7 +57,7 @@ class NotesHolder(Boxes):
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1)
|
||||||
self.addSettingsArgs(edges.StackableSettings)
|
self.addSettingsArgs(edges.StackableSettings)
|
||||||
|
|
|
@ -21,7 +21,7 @@ class OpenBox(Boxes):
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.buildArgParser("x", "y", "h", "outside")
|
self.buildArgParser("x", "y", "h", "outside")
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
|
|
|
@ -45,7 +45,7 @@ class OrganPipe(Boxes): # Change class name!
|
||||||
def getAirSpeed(self, wind_pressure, air_density=1.2):
|
def getAirSpeed(self, wind_pressure, air_density=1.2):
|
||||||
return (2.0 * (wind_pressure / air_density))**.5
|
return (2.0 * (wind_pressure / air_density))**.5
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, finger=3.0, space=3.0,
|
self.addSettingsArgs(edges.FingerJointSettings, finger=3.0, space=3.0,
|
||||||
|
|
|
@ -28,7 +28,7 @@ class OttoBody(Boxes):
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
self.addSettingsArgs(edges.ChestHingeSettings)
|
self.addSettingsArgs(edges.ChestHingeSettings)
|
||||||
|
|
|
@ -29,7 +29,7 @@ class OttoLegs(Boxes):
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, finger=1.0, space=1.0,
|
self.addSettingsArgs(edges.FingerJointSettings, finger=1.0, space=1.0,
|
||||||
|
|
|
@ -21,7 +21,7 @@ class OttoSoles(Boxes):
|
||||||
|
|
||||||
ui_group = "Misc"
|
ui_group = "Misc"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.buildArgParser(x=58., y=38.)
|
self.buildArgParser(x=58., y=38.)
|
||||||
|
|
|
@ -23,7 +23,7 @@ class PaintStorage(Boxes):
|
||||||
webinterface = True
|
webinterface = True
|
||||||
ui_group = "Shelf" # see ./__init__.py for names
|
ui_group = "Shelf" # see ./__init__.py for names
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings)
|
self.addSettingsArgs(edges.FingerJointSettings)
|
||||||
|
|
|
@ -35,7 +35,7 @@ There is marks in the "outside leftover paper" to help see where to fold
|
||||||
A paper creaser (or bone folder) is also useful.
|
A paper creaser (or bone folder) is also useful.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.buildArgParser("x", "y", "h")
|
self.buildArgParser("x", "y", "h")
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ class PhoneHolder(Boxes):
|
||||||
Default values are currently based on Galaxy S7.
|
Default values are currently based on Galaxy S7.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
"--phone_height",
|
"--phone_height",
|
||||||
|
@ -213,7 +213,7 @@ class PhoneHolder(Boxes):
|
||||||
|
|
||||||
|
|
||||||
class BottomEdge(edges.BaseEdge):
|
class BottomEdge(edges.BaseEdge):
|
||||||
def __init__(self, boxes, support_start_height, support_spacing):
|
def __init__(self, boxes, support_start_height, support_spacing) -> None:
|
||||||
super().__init__(boxes, None)
|
super().__init__(boxes, None)
|
||||||
self.support_start_height = support_start_height
|
self.support_start_height = support_start_height
|
||||||
self.support_spacing = support_spacing
|
self.support_spacing = support_spacing
|
||||||
|
@ -241,7 +241,7 @@ class BottomEdge(edges.BaseEdge):
|
||||||
|
|
||||||
|
|
||||||
class SideEdge(edges.BaseEdge):
|
class SideEdge(edges.BaseEdge):
|
||||||
def __init__(self, boxes, tab_start, tab_length, reverse=False):
|
def __init__(self, boxes, tab_start, tab_length, reverse=False) -> None:
|
||||||
super().__init__(boxes, None)
|
super().__init__(boxes, None)
|
||||||
self.tab_start = tab_start
|
self.tab_start = tab_start
|
||||||
self.tab_length = tab_length
|
self.tab_length = tab_length
|
||||||
|
@ -270,7 +270,7 @@ class SideEdge(edges.BaseEdge):
|
||||||
|
|
||||||
|
|
||||||
class TabbedEdge(edges.BaseEdge):
|
class TabbedEdge(edges.BaseEdge):
|
||||||
def __init__(self, boxes, tab_start, tab_length, tab_depth, reverse=False):
|
def __init__(self, boxes, tab_start, tab_length, tab_depth, reverse=False) -> None:
|
||||||
super().__init__(boxes, None)
|
super().__init__(boxes, None)
|
||||||
self.tab_start = tab_start
|
self.tab_start = tab_start
|
||||||
self.tab_length = tab_length
|
self.tab_length = tab_length
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Planetary(Boxes):
|
||||||
|
|
||||||
ui_group = "Part"
|
ui_group = "Part"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
"--sunteeth", action="store", type=int, default=8,
|
"--sunteeth", action="store", type=int, default=8,
|
||||||
|
|
|
@ -24,7 +24,7 @@ class Planetary2(Boxes):
|
||||||
|
|
||||||
description = """Still has issues. The middle planetary gears set must not have a mashing sun gear as it can't be a proper gear set."""
|
description = """Still has issues. The middle planetary gears set must not have a mashing sun gear as it can't be a proper gear set."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.buildArgParser("nema_mount")
|
self.buildArgParser("nema_mount")
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
|
|
|
@ -97,7 +97,7 @@ class Platonic(Boxes):
|
||||||
"icosahedro": (20, 3),
|
"icosahedro": (20, 3),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0)
|
||||||
|
|
|
@ -19,7 +19,7 @@ from boxes import *
|
||||||
class PoleHook(Boxes): # change class name here and below
|
class PoleHook(Boxes): # change class name here and below
|
||||||
"""Hook for pole like things to be clamped to another pole"""
|
"""Hook for pole like things to be clamped to another pole"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
# Uncomment the settings for the edge types you use
|
# Uncomment the settings for the edge types you use
|
||||||
|
|
|
@ -23,7 +23,7 @@ class Pulley(Boxes):
|
||||||
|
|
||||||
ui_group = "Part"
|
ui_group = "Part"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
# remove cli params you do not need
|
# remove cli params you do not need
|
||||||
self.buildArgParser(h=6.)
|
self.buildArgParser(h=6.)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Rack19Box(Boxes):
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5)
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
|
|
|
@ -8,7 +8,7 @@ class Rack19HalfWidth(Boxes):
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
'--ru_count', action='store', type=float, default=1,
|
'--ru_count', action='store', type=float, default=1,
|
||||||
|
|
|
@ -22,7 +22,7 @@ class RackBox(Boxes):
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1.2)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1.2)
|
||||||
self.buildArgParser("x", "y", "h", "outside")
|
self.buildArgParser("x", "y", "h", "outside")
|
||||||
|
|
|
@ -21,7 +21,7 @@ class RectangularWall(Boxes):
|
||||||
|
|
||||||
ui_group = "Part" # see ./__init__.py for names
|
ui_group = "Part" # see ./__init__.py for names
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
|
|
||||||
self.addSettingsArgs(edges.CabinetHingeSettings)
|
self.addSettingsArgs(edges.CabinetHingeSettings)
|
||||||
|
|
|
@ -28,7 +28,7 @@ The lids needs to be glued. For the bayonet lid all outside rings attach to the
|
||||||
|
|
||||||
ui_group = "Box"
|
ui_group = "Box"
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self) -> None:
|
||||||
Boxes.__init__(self)
|
Boxes.__init__(self)
|
||||||
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1)
|
self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1)
|
||||||
self.buildArgParser("h", "outside")
|
self.buildArgParser("h", "outside")
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue