parent
3117f2c49e
commit
6e9b70b248
|
@ -23,7 +23,7 @@ def getDescriptions():
|
||||||
if inspect.isclass(edge) and issubclass(edge, BaseEdge)
|
if inspect.isclass(edge) and issubclass(edge, BaseEdge)
|
||||||
and edge.char}
|
and edge.char}
|
||||||
|
|
||||||
class BoltPolicy:
|
class BoltPolicy(object):
|
||||||
"""Abstract class
|
"""Abstract class
|
||||||
|
|
||||||
Distributes (bed) bolts on a number of segments
|
Distributes (bed) bolts on a number of segments
|
||||||
|
@ -100,7 +100,7 @@ class Bolts(BoltPolicy):
|
||||||
### Settings
|
### Settings
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
class Settings:
|
class Settings(object):
|
||||||
"""Generic Settings class
|
"""Generic Settings class
|
||||||
|
|
||||||
Used by different other classes to store messurements and details.
|
Used by different other classes to store messurements and details.
|
||||||
|
@ -153,7 +153,7 @@ class Settings:
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
|
|
||||||
class BaseEdge:
|
class BaseEdge(object):
|
||||||
"""Abstract base class for all Edges"""
|
"""Abstract base class for all Edges"""
|
||||||
char = None
|
char = None
|
||||||
description = "Abstract Edge Class"
|
description = "Abstract Edge Class"
|
||||||
|
@ -214,7 +214,7 @@ class CompoundEdge(BaseEdge):
|
||||||
description = "Compound Edge"
|
description = "Compound Edge"
|
||||||
|
|
||||||
def __init__(self, boxes, types, lengths):
|
def __init__(self, boxes, types, lengths):
|
||||||
Edge.__init__(self, 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]
|
||||||
self.lengths = lengths
|
self.lengths = lengths
|
||||||
self.length = sum(lengths)
|
self.length = sum(lengths)
|
||||||
|
@ -255,7 +255,7 @@ class Slot(BaseEdge):
|
||||||
description = "Slot"
|
description = "Slot"
|
||||||
|
|
||||||
def __init__(self, boxes, depth):
|
def __init__(self, boxes, depth):
|
||||||
Edge.__init__(self, boxes, None)
|
super(Slot, self).__init__(boxes, None)
|
||||||
self.depth = depth
|
self.depth = depth
|
||||||
|
|
||||||
def __call__(self, length, **kw):
|
def __call__(self, length, **kw):
|
||||||
|
@ -275,7 +275,7 @@ class SlottedEdge(BaseEdge):
|
||||||
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):
|
||||||
Edge.__init__(self, boxes, None)
|
super(SlottedEdge, self).__init__(boxes, None)
|
||||||
self.edge = self.edges.get(edge, edge)
|
self.edge = self.edges.get(edge, edge)
|
||||||
self.sections = sections
|
self.sections = sections
|
||||||
self.slots = slots
|
self.slots = slots
|
||||||
|
@ -442,7 +442,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):
|
||||||
Edge.__init__(self, boxes, None, **kw)
|
super(FingerHoleEdge, self).__init__(boxes, None, **kw)
|
||||||
self.fingerHoles = fingerHoles or boxes.fingerHolesAt
|
self.fingerHoles = fingerHoles or boxes.fingerHolesAt
|
||||||
|
|
||||||
def __call__(self, length, dist=None,
|
def __call__(self, length, dist=None,
|
||||||
|
@ -468,7 +468,7 @@ class CrossingFingerHoleEdge(BaseEdge):
|
||||||
description = "Edge (orthogonal Finger Joint Holes)"
|
description = "Edge (orthogonal Finger Joint Holes)"
|
||||||
|
|
||||||
def __init__(self, boxes, height, fingerHoles=None, **kw):
|
def __init__(self, boxes, height, fingerHoles=None, **kw):
|
||||||
Edge.__init__(self, boxes, None, **kw)
|
super(CrossingFingerHoleEdge, self).__init__(boxes, None, **kw)
|
||||||
self.fingerHoles = fingerHoles or boxes.fingerHolesAt
|
self.fingerHoles = fingerHoles or boxes.fingerHolesAt
|
||||||
self.height = height
|
self.height = height
|
||||||
|
|
||||||
|
@ -515,7 +515,7 @@ class StackableEdge(BaseEdge):
|
||||||
bottom = True
|
bottom = True
|
||||||
|
|
||||||
def __init__(self, boxes, settings, fingerjointsettings):
|
def __init__(self, boxes, settings, fingerjointsettings):
|
||||||
Edge.__init__(self, boxes, settings)
|
super(StackableEdge, self).__init__(boxes, settings)
|
||||||
self.fingerjointsettings = fingerjointsettings
|
self.fingerjointsettings = fingerjointsettings
|
||||||
|
|
||||||
def __call__(self, length, **kw):
|
def __call__(self, length, **kw):
|
||||||
|
|
Loading…
Reference in New Issue