RegularBox: Add angled hole top style
This commit is contained in:
parent
b2b0ccd6f1
commit
0dc6aef5d4
|
@ -32,7 +32,7 @@ class RegularBox(Boxes):
|
||||||
help="number of sides")
|
help="number of sides")
|
||||||
self.argparser.add_argument(
|
self.argparser.add_argument(
|
||||||
"--top", action="store", type=str, default="none",
|
"--top", action="store", type=str, default="none",
|
||||||
choices=["none", "hole", "angled lid", "angled lid2", "round lid"],
|
choices=["none", "hole", "angled hole", "angled lid", "angled lid2", "round lid"],
|
||||||
help="style of the top and lid")
|
help="style of the top and lid")
|
||||||
|
|
||||||
def render(self):
|
def render(self):
|
||||||
|
@ -57,10 +57,11 @@ class RegularBox(Boxes):
|
||||||
if self.top == "angled lid":
|
if self.top == "angled lid":
|
||||||
self.regularPolygonWall(corners=n, r=r, edges='e', move="right")
|
self.regularPolygonWall(corners=n, r=r, edges='e', move="right")
|
||||||
self.regularPolygonWall(corners=n, r=r, edges='E', move="right")
|
self.regularPolygonWall(corners=n, r=r, edges='E', move="right")
|
||||||
elif self.top == "angled lid2":
|
elif self.top in ("angled hole", "angled lid2"):
|
||||||
self.regularPolygonWall(corners=n, r=r, edges='F', move="right",
|
self.regularPolygonWall(corners=n, r=r, edges='F', move="right",
|
||||||
callback=[lambda:self.regularPolygonAt(
|
callback=[lambda:self.regularPolygonAt(
|
||||||
0, 0, n, h=sh-t)])
|
0, 0, n, h=sh-t)])
|
||||||
|
if self.top == "angled lid2":
|
||||||
self.regularPolygonWall(corners=n, r=r, edges='E', move="right")
|
self.regularPolygonWall(corners=n, r=r, edges='E', move="right")
|
||||||
elif self.top in ("hole", "round lid"):
|
elif self.top in ("hole", "round lid"):
|
||||||
self.regularPolygonWall(corners=n, r=r, edges='F', move="right",
|
self.regularPolygonWall(corners=n, r=r, edges='F', move="right",
|
||||||
|
|
Loading…
Reference in New Issue