From a032067c5b9ee6183f005fc0dd27868aa2296555 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Thu, 30 Jun 2016 11:12:51 +0200 Subject: [PATCH] Add edge with two hinges to top edge param and edge descriptions --- boxes/__init__.py | 2 +- boxes/edges.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/boxes/__init__.py b/boxes/__init__.py index c1fc302..1ef64d7 100755 --- a/boxes/__init__.py +++ b/boxes/__init__.py @@ -256,7 +256,7 @@ class Boxes: elif arg == "top_edge": self.argparser.add_argument( "--top_edge", action="store", - type=ArgparseEdgeType("ecESi"), choices=list("ecESi"), + type=ArgparseEdgeType("ecESik"), choices=list("ecESik"), default="e", help="edge type for top edge") else: raise ValueError("No default for argument", arg) diff --git a/boxes/edges.py b/boxes/edges.py index 4df6003..b02248c 100644 --- a/boxes/edges.py +++ b/boxes/edges.py @@ -19,9 +19,11 @@ import math import inspect def getDescriptions(): - return {edge.char : edge.description for edge in globals().values() - if inspect.isclass(edge) and issubclass(edge, BaseEdge) - and edge.char} + d = {edge.char : edge.description for edge in globals().values() + if inspect.isclass(edge) and issubclass(edge, BaseEdge) + and edge.char} + d['k'] = "Straight edge with hinge eye (both ends)" + return d class BoltPolicy(object): """Abstract class